This is the mail archive of the insight@sources.redhat.com mailing list for the Insight 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: Dwarf-2 problem in Insight GDB


On Wed, 14 Aug 2002, Cheng, Cheuk wrote:

> I had tried downloading Insight GDB sources dated 07-18-2002 and built a
> sparc-elf version successfully.  Then I compiled a small C program using
> my sparc-elf compiler.  But when I loaded the compiled .o file into GDB,
> it shows only the assembly language window while the "Current function
> name" listbox shows the name "main" and the "Current file name" listbox
> is empty.  If I select the name of the source file from the "Current
> file name" listbox, then the source code will be displayed in full on
> the screen.  However, when I click on the "-" next to a source line to
> set a breakpoint, no red circle breakpoint market appears.  I am not
> sure whether my compiler is generating the wrong dwarf-2 info in the .o
> file or whether my GDB is not working (or built) properly.  The same
> problem happens if I compile my test file with -gdwarf instead of
> -gdwarf while simply using -g will not have this problem.  I have
> attached my small source and .o file here.

Hmmm... You compiled a small C program, or an object file? Your test.zip 
shows:

test.c
test.o

When I load test.o into gdb, I get:

(gdb) p main
$1 = {<text variable, no debug info>} 0

How did you compile this? There appears to be no (usable?) debug info in 
the file. (Is this really linked?? There's no printf in the executable.)

Keith


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