This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj/gdb in cross env


FERANDELLE Pascal wrote:

Andrew Haley a écrit :



FERANDELLE Pascal writes:
> I build gcc/gcj 4.1.0 in cross env for target powerpc-linux, and did the same for gdb 6.4.

> As I have a "Segmentation fault" with an HelloWorld program written
> in Java, and compiled with powerpc-linux-gcj -g, I tried to launch
> powerpc-linux-gdb on the exec file, but an error occurred :
>
> Dwarf Error : wrong version in compilation unit header (is 99, should be 2) [in module HelloWorld]

I don't understand this.

You're not telling us what you are doing.  Where is gdb running?  On
the host or the target?

If we're going to be of any use to you, you must post full information
about what you are doing.


Host
    powerpc-linux-gcj -g -o HW HW.java --main=HW --static

Target
    gdbserver host:2345 HW

Host
    powerpc-linux-gdb HW
    -> Dwarf Error ...
    under gdb : target remote vmpc:2345
    but after, no debug is possible (no symbol table, no stack, etc)

When I built gdb 6.4 for target powerpc-linux, I have to configure it with --disable-werror, because without that, the build stopped due to several warnings of "value computed is not used".


I don't know what is happening, but have several suggestions:


1) Perhaps try gdb 6.3.

2) Ask on the gdb@sources.redhat.com mailing list as the first thing you need to do is get gdb running.

3) Can you build a native gdb? I have not had very much luck with gdbserver in the past. If your target has enough virtual memory, it is probably best to run gdb on the target. Configure gdb with something like --target=powerpc-linux --host=powerpc-linux --build=i686-pc-linux-gnu (or whatever the case may be).

David Daney.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]