public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Guinevere Larsen <blarsen@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 1/2] gdb/record: print frame information when exiting a recursive call
Date: Wed, 27 Sep 2023 14:26:19 -0700	[thread overview]
Message-ID: <20230927142619.04ca311d@f37-zws-nv> (raw)
In-Reply-To: <20230927101950.1913970-4-blarsen@redhat.com>

Hi Gwen,

On Wed, 27 Sep 2023 12:19:51 +0200
Guinevere Larsen <blarsen@redhat.com> wrote:

>  gdb/infrun.c                            | 18 ++++++++++
>  gdb/testsuite/gdb.reverse/recursion.c   | 44 ++++++++++++++++++++++++
>  gdb/testsuite/gdb.reverse/recursion.exp | 45 +++++++++++++++++++++++++
>  3 files changed, 107 insertions(+)
>  create mode 100644 gdb/testsuite/gdb.reverse/recursion.c
>  create mode 100644 gdb/testsuite/gdb.reverse/recursion.exp

I've applied your patch and have tested on Fedora 38, for both
x86_64 and aarch64 (both native).  I see no regressions on aarch64,
but on x86_64, I'm seeing this failure when your patch is applied:

FAIL: gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: END with address 1 eliminated

After studying the log files, this makes absolutely no sense to me
since your patch should not have any affect on the "maint info line-table"
command.  Here are the relevant sections of the log files:

- - - passing run - - -
(gdb) break -qualified main
Breakpoint 1 at 0x40110a: file /ironwood1/sourceware-git/f38-review/bld/../../worktree-review/gdb/testsuite/gdb.dwarf2/main.c, line 1.
(gdb) run 
Starting program: /mesquite2/sourceware-git/f38-review/bld/gdb/testsuite/outputs/gdb.dwarf2/dw2-out-of-range-end-of-seq/dw2-out-of-range-end-of-seq 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, 0x000000000040110a in main () at /ironwood1/sourceware-git/f38-review/bld/../../worktree-review/gdb/testsuite/gdb.dwarf2/main.c:1
1	/* This testcase is part of GDB, the GNU debugger.
(gdb) maint info line-table main.c$
objfile: /mesquite2/sourceware-git/f38-review/bld/gdb/testsuite/outputs/gdb.dwarf2/dw2-out-of-range-end-of-seq/dw2-out-of-range-end-of-seq ((struct objfile *) 0x18e5670)
compunit_symtab: main.c ((struct compunit_symtab *) 0x18e5b90)
symtab: /mesquite2/sourceware-git/worktree-review/gdb/testsuite/gdb.dwarf2/main.c ((struct symtab *) 0x18e5c10)
linetable: ((struct linetable *) 0x18e5e30):
INDEX  LINE   REL-ADDRESS        UNREL-ADDRESS      IS-STMT PROLOGUE-END 
0      1      0x0000000000401106 0x0000000000401106 Y                    
1      END    0x0000000000401111 0x0000000000401111 Y                    

(gdb) PASS: gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: END with address 1 eliminated
testcase /ironwood1/sourceware-git/f38-review/bld/../../worktree-review/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp completed in 1 seconds
- - - end passing run - - -

- - - failing run - - -
(gdb) break -qualified main
Breakpoint 1 at 0x40110a: file /ironwood1/sourceware-git/f38-review/bld/../../worktree-review/gdb/testsuite/gdb.dwarf2/main.c, line 1.
(gdb) run 
Starting program: /mesquite2/sourceware-git/f38-review/bld/gdb/testsuite/outputs/gdb.dwarf2/dw2-out-of-range-end-of-seq/dw2-out-of-range-end-of-seq 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, 0x000000000040110a in main () at /ironwood1/sourceware-git/f38-review/bld/../../worktree-review/gdb/testsuite/gdb.dwarf2/main.c:1
1	/* This testcase is part of GDB, the GNU debugger.
(gdb) maint info line-table main.c$
objfile: /mesquite2/sourceware-git/f38-review/bld/gdb/testsuite/outputs/gdb.dwarf2/dw2-out-of-range-end-of-seq/dw2-out-of-range-end-of-seq ((struct objfile *) 0x24a85b0)
compunit_symtab: main.c ((struct compunit_symtab *) 0x24a8ad0)
symtab: /mesquite2/sourceware-git/worktree-review/gdb/testsuite/gdb.dwarf2/main.c ((struct symtab *) 0x24a8b50)
linetable: ((struct linetable *) 0x24a8d70):
INDEX  LINE   REL-ADDRESS        UNREL-ADDRESS      IS-STMT PROLOGUE-END 
0      1      0x0000000000401106 0x0000000000401106 Y                    
1      END    0x0000000000401111 0x0000000000401111 Y                    

objfile: /usr/lib/debug/usr/lib64/libc.so.6-2.37-4.fc38.x86_64.debug ((struct objfile *) 0x26435b0)
compunit_symtab: <unknown> ((struct compunit_symtab *) 0x2eb2260)
symtab: /usr/src/debug/glibc-2.37-4.fc38.x86_64/intl/textdomain.c ((struct symtab *) 0x2f60430)
linetable: ((struct linetable *) 0x0):
No line table.

objfile: /usr/lib/debug/usr/lib64/libc.so.6-2.37-4.fc38.x86_64.debug ((struct objfile *) 0x26435b0)
compunit_symtab: <unknown> ((struct compunit_symtab *) 0x2eb2260)
symtab: /usr/src/debug/glibc-2.37-4.fc38.x86_64/support/support_test_main.c ((struct symtab *) 0x2f725d0)
linetable: ((struct linetable *) 0x0):
No line table.

(gdb) FAIL: gdb.dwarf2/dw2-out-of-range-end-of-seq.exp: END with address 1 eliminated
testcase /ironwood1/sourceware-git/f38-review/bld/../../worktree-review/gdb/testsuite/gdb.dwarf2/dw2-out-of-range-end-of-seq.exp completed in 1 seconds
- - - end failing run - - -

The difference here is that the failing run is (also) attempting to
list the line table for libc (and twice for some reason).  As noted
earlier, I don't see how your change can affect this area of the code,
but, multiple times, I've done a "git reset --hard" to get rid of your
commit, followed by a rebuild and test, each time seeing the test pass. 
After that, I've applied your patch, rebuilt, and tested again, each
time seeing this test fail.

Are you able to reproduce this problem?

(I'll continue to study it here - there may be something weird going
on with the VM upon which I'm testing...)

Kevin


  reply	other threads:[~2023-09-27 21:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 10:19 [PATCH v3 0/2] Improving frame printing with recursive Guinevere Larsen
2023-09-27 10:19 ` [PATCH v3 1/2] gdb/record: print frame information when exiting a recursive call Guinevere Larsen
2023-09-27 21:26   ` Kevin Buettner [this message]
2023-09-27 23:22     ` Kevin Buettner
2023-09-28  1:57       ` Kevin Buettner
2023-10-02 13:11         ` Guinevere Larsen
2023-09-27 10:19 ` [PATCH v3 2/2] gdb/infrun: simplify process_event_stop_test Guinevere Larsen

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=20230927142619.04ca311d@f37-zws-nv \
    --to=kevinb@redhat.com \
    --cc=blarsen@redhat.com \
    --cc=gdb-patches@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).