From: Michael Eager <eager@eagercon.com>
To: Nagaraju Mekala <gnuuser.raj@gmail.com>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Issue with debug symbols with garbage collector
Date: Wed, 20 Apr 2022 12:22:15 -0700 [thread overview]
Message-ID: <ef61be82-1489-7908-5f79-e8060b5d33de@eagercon.com> (raw)
In-Reply-To: <CAKuVEhDo6AEhYLFkjeEjYkyS3vHVMp1d_paqrBWtXmwf=0ZvvQ@mail.gmail.com>
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?
>
>
> 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.
> 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?
--
Michael Eager
next prev parent reply other threads:[~2022-04-20 19:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 9:15 Nagaraju Mekala
2022-04-20 19:22 ` Michael Eager [this message]
2022-04-21 7:27 ` Nagaraju Mekala
2022-04-21 18:11 ` Michael Eager
2022-04-21 18:28 ` Michael Eager
2022-04-22 6:29 ` Nagaraju Mekala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef61be82-1489-7908-5f79-e8060b5d33de@eagercon.com \
--to=eager@eagercon.com \
--cc=gcc-help@gcc.gnu.org \
--cc=gnuuser.raj@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).