Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: New feature "source-id"
Date: Tue, 18 Mar 2014 00:25:00 -0000	[thread overview]
Message-ID: <CADPb22ShBWC=VSSiyWzNcb++tZwCKaNidKqb74gbmNn3W839sQ@mail.gmail.com> (raw)
In-Reply-To: <2739108.yJ4Vgng9gv@ws-gergap>

On Mon, Mar 17, 2014 at 12:01 PM, Gerhard Gappmeier
<gerhard.gappmeier@ascolab.com> wrote:
>> > example vcsinfo.c:
>> > /* this file was genarated, bla bla, don't modifiy */
>> > static const char vcs_type[] = "git";
>> > static const char vcs_url[] = "git@github.com:gergap/source-id.git"
>> > static const char vcs_version[] =
>> > "c2ec66e6a36451ba47422d186fd97311989ef278"
>> I think its weird to store this in .rodata instead of somewhere it can
>> be easily stripped, especially if you plan on adding the sha1 file
>> hashes through this same mechanism, since that is a less constant
>> size, though you did mention adding that to the debug info
>> specifically.
> I agree. That's a good point. I think we should stay with the original idea of
> having a .note section. It is also more consistent with the build-id feature.

I agree the consistency of .note is nice, but I wouldn't preclude
people wanting something different.
Getting something into a .note section may involve more build changes
than some group may want to take on.

> Another argument against adding this to the source might be code size. For
> small programs on embedded devices memory matters, so saving these strings
> would be a benefit. The .note section can be stripped and the feature would
> still work with the "separate-debug-info" approach.

Technically, even if the info was added to the source (so to speak),
it needn't affect code size.
I can imagine all of these (so called) global variables being put in a
specific section which is put in a non-loadable segment.

The solution in gdb needn't preclude any implementation, that is up to
the script.
So, assuming the community wants this feature, let's separate out how
the source information is obtained from how gdb uses it.

btw, If Python doesn't have a library for reading ELF files, it should.
Thus we needn't hardcode anything about where the data lives into gdb
- leave it to the externally supplied script.


  reply	other threads:[~2014-03-18  0:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-15 10:49 Gerhard Gappmeier
2014-03-15 17:32 ` Doug Evans
2014-03-15 20:06   ` Eli Zaretskii
2014-03-16  2:34     ` Doug Evans
2014-03-16  9:43       ` Gerhard Gappmeier
2014-03-16 16:22       ` Doug Evans
2014-03-16 16:34         ` Eli Zaretskii
2014-03-17  8:49         ` Gerhard Gappmeier
2014-03-17 12:25           ` Matt Rice
2014-03-17 19:01             ` Gerhard Gappmeier
2014-03-18  0:25               ` Doug Evans [this message]
2014-03-18  0:48                 ` Bruce Dawson
2014-03-18  1:39                   ` Doug Evans
2014-03-18 17:44                     ` Bruce Dawson
2014-03-18 17:57                       ` Doug Evans
2014-03-18 13:22 ` Mark Wielaard
2014-03-18 14:00   ` Gerhard Gappmeier
2014-03-18 15:03     ` Mark Wielaard
2014-03-18 16:40       ` Gerhard Gappmeier
2014-03-18 17:56         ` Bruce Dawson
2014-05-21 19:30           ` Tom Tromey
2014-05-21 20:42             ` Bruce Dawson

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='CADPb22ShBWC=VSSiyWzNcb++tZwCKaNidKqb74gbmNn3W839sQ@mail.gmail.com' \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gerhard.gappmeier@ascolab.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