Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis Machado <lgustavo@codesourcery.com>
To: Yao Qi <qiyaoltc@gmail.com>, Taimoor <tmirza@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: Improving GDB's mechanism to check if function is GC'ed
Date: Wed, 10 Jun 2015 11:18:00 -0000	[thread overview]
Message-ID: <55781D03.5070003@codesourcery.com> (raw)
In-Reply-To: <86eglkeyfw.fsf@gmail.com>

On 06/10/2015 05:53 AM, Yao Qi wrote:
> Taimoor <tmirza@codesourcery.com> writes:
>
> Hi Taimoor,
> I happen to have to some time today to read your patch, here are my
> comments below,
>
>>
>> Current Problem
>> ===============
>>
>> We are currently using GDB to debug Nucleus based bare-metal system
>> that also allows to dynamically load and unload Nucleus process
>> modules during system execution.
>> We currently load symbols of a modules using add-symbol-file whenever
>> a module is loaded at runtime. It is very common to have functions at
>> address 0x0 in debug information and then lowpc in symbol table to be
>> non-zero as it depends on section addresses given in add-symbol-file
>> command.
>
> GDB just uses some heuristics to determine whether the function is GC'ed
> by linker, so they may not be perfect.  However, GDB doesn't support
> Nucleus, so it isn't a valid case to me.  Do we have other cases that we
> add-symbol-file in which function address is at 0x0 on platforms GDB
> supports?
>
> If the problem only exists on Nucleus, I am afraid I don't agree with
> accepting this change, because GDB doesn't support Nucleus.  Sorry.

add-symbol-file can cause things to get weird with addresses given the 
user can specify the base address as it pleases. I don't think this is 
Nucleus-specific at all, but more generally bare-metal-specific.

I take it DWARF says 0x0 and GDB relocates the symbol file/addresses 
based on the provided base address? Taimoor?


  parent reply	other threads:[~2015-06-10 11:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 13:38 Taimoor
2015-06-09  6:16 ` Taimoor
2015-06-09 13:36   ` Yao Qi
2015-06-10  8:54 ` Yao Qi
2015-06-10 10:17   ` Pedro Alves
2015-06-10 12:04     ` Taimoor
2015-06-10 12:07     ` Yao Qi
2015-06-10 14:43       ` Pedro Alves
2015-06-11  8:30         ` Yao Qi
2015-06-11  8:54           ` Pedro Alves
2015-06-10 11:18   ` Luis Machado [this message]
2015-06-10 11:46     ` Taimoor
2015-06-10 12:25       ` Yao Qi

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=55781D03.5070003@codesourcery.com \
    --to=lgustavo@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    --cc=tmirza@codesourcery.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