This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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: relocations when doing file command at gdb prompt


On Wed, Mar 07, 2007 at 05:16:02PM +0100, Roland Puntaier wrote:
> (gdb) file -readnow YYY
>     dbxread.c:
>         process_one_symbol(){...
>         function_start_offset = ANOFFSET (section_offsets, 
> SECT_OFF_TEXT (objfile));
>         ...
>         case N_SLINE:...
>         valu += function_start_offset;
>         ...
>         record_line(,,valu);
>     buildsym.c:
>         record_line(,,pc){...e->pc = ADDR_BITS_REMOVE(pc);
> function_start_offset had twice the value it should have when 
> compared to objdump output.

So, are you loading an object file or a linked program?  Does it have
relocations included?  It sounds sort of like this is a linked program
with --emit-relocs; I believe someone else reported a similar problem
earlier this year.

A test case is always very helpful.

-- 
Daniel Jacobowitz
CodeSourcery


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