Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Taimoor <tmirza@codesourcery.com>
To: Pedro Alves <palves@redhat.com>, Yao Qi <qiyaoltc@gmail.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 12:04:00 -0000	[thread overview]
Message-ID: <557827B7.7090902@codesourcery.com> (raw)
In-Reply-To: <55780EB4.1070003@redhat.com>



On 06/10/2015 03:17 PM, Pedro Alves wrote:
> Hmm, does it really need to, though?  We expose mechanisms like
> add-symbol-file, xml library list with qXfer:libraries:read (the default
> solib provider), xml target descriptions, "info os", etc., exactly so
> that GDB doesn't have to learn about the myriad of random RTOS's out there.
>
> That said, I don't really understand the patch.  How can you have
> real code at address 0, but then_not_  have address 0 covered
> by a section?

This code is a relocatable object that is dynamically loaded by dynamic 
loader that is part of loaded image. So you load your main kernel image 
but you can load/unload relocatable objects to add further enhancements 
to your main kernel image. This allows RTOS application developers to 
add new features or provide bug fixes in their applications without 
rebuilding and reflashing everything.

We currently use add-symbol-file for these relocatable objects. Previous 
GC'ing mechanism of GDB was working fine for us as it was using flag 
has_section_at_zero to determine whether
address zero in debug info means the corresponding code has been
GC'ed. But this mechanism was changed in 
https://sourceware.org/ml/gdb-patches/2014-08/msg00468.html and now 
functions at address 0x0 in dwarf of relocatable object are marked GC'ed 
by GDB.

Thanks,
Taimoor


  reply	other threads:[~2015-06-10 12:04 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 [this message]
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
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=557827B7.7090902@codesourcery.com \
    --to=tmirza@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=qiyaoltc@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