Skip to main content

Help on porting CDC-phoneme_advanced_mr2 to sh4!

3 replies [Last post]
lxk3480
Offline
Joined: 2008-07-27
Points: 0

Hi,all
Following is the log when I debug with gdb.
Program received signal SIGSEGV, Segmentation fault.
I have no idea about it.
Anyone any advice? Thanks lot!

172.16.13.254:/usr/CDC-phoneme_advanced_mr2_b82-linux_sh4_st-bin-rev# gdb bin/cvm
GNU gdb STMicroelectronics/Linux Base 6.4-9 [build Oct 15 2006]
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sh4-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run -cp testclasses.zip HelloWorld
Starting program: /usr/CDC-phoneme_advanced_mr2_b82-linux_sh4_st-bin-rev/bin/cvm -cp testclasses.zip HelloWorld
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[Thread debugging using libthread_db enabled]
[New Thread 693587528 (LWP 460)]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 693587528 (LWP 460)]
0x0048ff02 in Java_java_lang_Class_getPrimitiveClass (env=0x600648,
cls=, name=0x6303c4)
at ../../src/share/native/java/lang/Class.c:188
188 ../../src/share/native/java/lang/Class.c: No such file or directory.
in ../../src/share/native/java/lang/Class.c
(gdb) where
#0 0x0048ff02 in Java_java_lang_Class_getPrimitiveClass (env=0x600648,
cls=, name=0x6303c4)
at ../../src/share/native/java/lang/Class.c:188
#1 0x004b8874 in args_done ()
#2 0x004b8874 in args_done ()
(gdb) p env
$1 = (JNIEnv *) 0x600648
(gdb) p *env
$2 = (JNIEnv) 0x0
(gdb) p *(JNIEnv *)env
$3 = (const struct JNINativeInterface *) 0x0
(gdb) p env->GetStringUTFChars
Cannot access memory at address 0x2a4

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi,all
> Following is the log when I debug with gdb.
> Program received signal SIGSEGV, Segmentation fault.
> I have no idea about it.
> Anyone any advice? Thanks lot!
>
> 172.16.13.254:/usr/CDC-phoneme_advanced_mr2_b82-linux_sh4_st-bin-rev# gdb bin/cvm
> GNU gdb STMicroelectronics/Linux Base 6.4-9 [build Oct 15 2006]
> Copyright 2005 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "sh4-linux"...Using host libthread_db library "/lib/libthread_db.so.1".
>
> (gdb) run -cp testclasses.zip HelloWorld
> Starting program: /usr/CDC-phoneme_advanced_mr2_b82-linux_sh4_st-bin-rev/bin/cvm -cp testclasses.zip HelloWorld
> [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
> [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
> [Thread debugging using libthread_db enabled]
> [New Thread 693587528 (LWP 460)]
> [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 693587528 (LWP 460)]
> 0x0048ff02 in Java_java_lang_Class_getPrimitiveClass (env=0x600648,
> cls=, name=0x6303c4)
> at ../../src/share/native/java/lang/Class.c:188
> 188 ../../src/share/native/java/lang/Class.c: No such file or directory.
> in ../../src/share/native/java/lang/Class.c
> (gdb) where
> #0 0x0048ff02 in Java_java_lang_Class_getPrimitiveClass (env=0x600648,
> cls=, name=0x6303c4)
> at ../../src/share/native/java/lang/Class.c:188
> #1 0x004b8874 in args_done ()
> #2 0x004b8874 in args_done ()
> (gdb) p env
> $1 = (JNIEnv *) 0x600648
> (gdb) p *env
> $2 = (JNIEnv) 0x0
> (gdb) p *(JNIEnv *)env
> $3 = (const struct JNINativeInterface *) 0x0
> (gdb) p env->GetStringUTFChars
> Cannot access memory at address 0x2a4
>

Hi lxk3480,

Looks like a problem with how you built your cvm binary. What was the
make command line that you used to build your cvm binary?

What is the output when you do a "ldd bin/cvm" command?

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

lxk3480
Offline
Joined: 2008-07-27
Points: 0

Hi,all,Is there any demo on sh4 for reference? Thanks!

cjplummer
Offline
Joined: 2006-10-16
Points: 0

Sorry, but there is not.