Re: Issue with debug symbols with garbage collector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

Thanks for the reply.

On Thu, Apr 21, 2022 at 12:52 AM Michael Eager <eager@xxxxxxxxxxxx> wrote:

> On 4/20/22 02:15, Nagaraju Mekala via Gcc-help wrote:
> > Hello All,
> >
> > When I enable the garbage collector for the microblaze compiler
> compilation
> > seems to be fine, but the debug symbols are not generated properly.
> >
> > If we set a breakpoint at 0x0 it is showing some different location, we
> can
> > see the same in the objdump as well.
>
> What different location?
>
>  I meant instead of pointing to _start, Debug symbols were pointing to
microblaze_register_handler.

> >
> >
> > Disassembly of section .vectors.reset:
> >
> > 00000000 <_start>:
> > *
> > *
> >
> ****************************************************************************/
> > void microblaze_register_handler(XInterruptHandler Handler, void
> *DataPtr)
> > {
> >     MB_InterruptVectorTable[0].Handler = Handler;
> >     0: b0008000 imm -32768
> >     4: b8080000 brai 0
> >
> > for the _start symbols "void
> microblaze_register_handler(XInterruptHandler
> > Handler, void *DataPtr)" is coming up.
>
> It looks like both _start and microblaze_register_handler are both at 0.
> What did you expect?
>
> GDB picks the first symbol which matches the address.
>
I have attached the elf, where we cannot find any symbols related to
microblaze_register_handler function but the debug_loc is somehow showing
up at _start address.


> > If I disable the garbage-collector then everything seems fine.
> > I have used "-ffunction-sections and -fdata-sections" options during
> > compilation and -gc-sections during linking command.
> >
> > Please let me know how to tell the garbage collector to not delete
> > debug_loc information.
>
> Why do you think that the garbage collector is deleting debug info?
>
I was just guessing since _start debug symbols were mixed with
microblaze_register_handler.


> --
> Michael Eager
>

Attachment: kc705_hello.elf
Description: Binary data


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux