public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "dje at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/17199] Recording two copies of plt minimal symbols is a pain to deal with
Date: Fri, 25 Jul 2014 19:42:00 -0000	[thread overview]
Message-ID: <bug-17199-4717-bbbj9vqHZ9@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-17199-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=17199

--- Comment #1 from dje at google dot com ---
More data.
This comment in symtab.h is incomplete.

  /* GDB uses mst_solib_trampoline for the start address of a shared            
     library trampoline entry.  Breakpoints for shared library functions        
     are put there if the shared library is not yet loaded.                     
     After the shared library is loaded, lookup_minimal_symbol will             
     prefer the minimal symbol from the shared library (usually                 
     a mst_text symbol) over the mst_solib_trampoline symbol, and the           
     breakpoints will be moved to their true address in the shared              
     library via breakpoint_re_set.  */

This is incomplete because in actuality there are three symbols:
1) in main exec, foo@plt, mst_text
2) in main exec, foo, mst_solib_trampoline
3) in shared lib, foo, mst_text

The comment leaves the reader guessing how #1 is discarded once the shared lib
is loaded, one reason being it too is mst_text.  Plus if you do "i b" before
the shared library is loaded it is foo@plt that is displayed, not foo.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


  reply	other threads:[~2014-07-25 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 16:58 [Bug symtab/17199] New: " dje at google dot com
2014-07-25 19:42 ` dje at google dot com [this message]
2014-07-26 21:48 ` [Bug symtab/17199] " xdje42 at gmail dot com
2023-02-12  6:21 ` cvs-commit at gcc dot gnu.org

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=bug-17199-4717-bbbj9vqHZ9@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).