Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>,
	Sergio Durigan Junior <sergiodj@redhat.com>
Subject: Re: [patchv2] Do not skip prologue for asm (.S) files
Date: Fri, 26 Jun 2015 12:57:00 -0000	[thread overview]
Message-ID: <047d7bf0f1c80cced205196b4997@google.com> (raw)

Jan Kratochvil writes:
  > On Thu, 25 Jun 2015 22:42:48 +0200, Doug Evans wrote:
  > > Hmmm, so there's an undocumented requirement that minsym_found
  > > and find_function_start_sal work compatibly?
  > > [Which is actually not surprising if you know how linespecs and
  > > breakpoints: we find all the matching minsyms and fullsyms
  > > and then throw away the duplicates. But if these two functions
  > > behave differently then the search for duplicates fails. At least
  > > I'm guessing that's what happened here.]
  >
  > Yes:
  > # (gdb) file  
/root/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.base/breako2
  > # Reading symbols from  
/root/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.base/breako2...done.
  > # (gdb) break main
  > #-Breakpoint 1 at 0x10000644: file ./gdb.base/break.c, line 43.
  > #-(gdb) PASS: gdb.base/break.exp: breakpoint function, optimized file
  > #+Breakpoint 1 at 0x10000640: main. (2 locations)
  > #### Num     Type           Disp Enb Address            What
  > #### 1       breakpoint     keep y   <MULTIPLE>
  > #### 1.1                         y     0x0000000010000640 in main  
at ./gdb.base/break.c:42
  > #### 1.2                         y     0x0000000010000644 in main  
at ./gdb.base/break.c:43
  > #+(gdb) FAIL: gdb.base/break.exp: breakpoint function, optimized file
  > # break marker4
  > # Breakpoint 2 at 0x10000aa0: file ./gdb.base/break1.c, line 59.
  > # (gdb) PASS: gdb.base/break.exp: breakpoint small function, optimized  
file
  > #[...]
  > # Continuing.
  > #-720
  > #-Breakpoint 2, marker4 (d=177601976) at ./gdb.base/break1.c:59
  > #-59     void marker4 (long d) { values[0].a_field = d; }        /* set  
breakpoint 14 here */
  > #-(gdb) PASS: gdb.base/break.exp: run until breakpoint set at small  
function, optimized file (line bp_location14)
  > #+Breakpoint 1, main (argc=1, argv=0x3fffffffec48, envp=0x3fffffffec58)  
at ./gdb.base/break.c:43
  > #+43         if (argc == 12345) {  /* an unlikely value < 2^16, in case  
uninited */ /* set breakpoint 6 here */
  > #+(gdb) FAIL: gdb.base/break.exp: run until breakpoint set at small  
function, optimized file
  >
  >
  > > Can you do that, plus add a comment to both minsym_found
  > > and find_function_start_sal stating that we rely on them
  > > working compatibly.
  >
  > Done.  Providing for review the final patch given all the changes.
  >
  >
  > Thanks,
  > Jan
  > gdb/ChangeLog
  > 2015-06-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
  >
  > 	* linespec.c (minsym_found): Reset sal.PC for COMPUNIT_LOCATIONS_VALID
  > 	and language_asm..
  > 	* symtab.c (find_function_start_sal): Likewise.
  >
  > gdb/testsuite/ChangeLog
  > 2015-06-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
  >
  > 	* gdb.arch/amd64-prologue-skip.S: New file.
  > 	* gdb.arch/amd64-prologue-skip.exp: New file.

LGTM.

Thanks!


             reply	other threads:[~2015-06-26 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26 12:57 Doug Evans [this message]
2015-06-26 13:16 ` [commit] " Jan Kratochvil
  -- strict thread matches above, loose matches on Subject: below --
2015-06-25 20:42 Doug Evans
2015-06-26  8:36 ` Jan Kratochvil
2015-06-20 15:44 [patch] " Jan Kratochvil
2015-06-21 22:52 ` Doug Evans
2015-06-22 21:16   ` Jan Kratochvil
2015-06-22 23:46     ` Doug Evans
2015-06-23 20:35       ` Jan Kratochvil
2015-06-24 20:20         ` Jan Kratochvil
2015-06-25 15:47           ` [patchv2] " Jan Kratochvil

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=047d7bf0f1c80cced205196b4997@google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=sergiodj@redhat.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