public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Guinevere Larsen <blarsen@redhat.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/dwarf2: Add support for DW_LNS_set_epilogue_begin in line-table
Date: Wed, 10 Jan 2024 18:01:47 +0100	[thread overview]
Message-ID: <6cfe89c3-cff0-4d56-bc96-7d8b358246fb@redhat.com> (raw)
In-Reply-To: <3cf538c1-c8a9-404f-a2d2-86fd3d39fb5b@simark.ca>

On 10/01/2024 17:57, Simon Marchi wrote:
> On 12/21/23 05:29, Guinevere Larsen wrote:
>> This commit adds a mechanism for GDB to detect the linetable opcode
>> DW_LNS_set_epilogue_begin. This opcode is set by compilers to indicate
>> that a certain instruction marks the point where the frame is destroyed.
>>
>> While the standard allows for multiple points marked with epilogue_begin
>> in the same function, for performance reasons, the function that
>> searches for the epilogue address will only find the last address that
>> sets this flag for a given block.
>>
>> This commit also changes amd64_stack_frame_destroyed_p_1 to attempt to
>> use the epilogue begin directly, and only if an epilogue can't be found
>> will it attempt heuristics based on the current instruction.
>>
>> Finally, this commit also changes the dwarf assembler to be able to emit
>> epilogue-begin instructions, to make it easier to test this patch
> Starting with this commit, I see:
>
> FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $fba_value == $fn_fba
> FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: check frame-id matches
> FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: bt 2
> FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: up
> FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $sp_value == $::main_sp
> FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: $fba_value == $::main_fba
> FAIL: gdb.base/unwind-on-each-insn-amd64.exp: foo: instruction 6: [string equal $fid $::main_fid]
>
> Do you see it?
>
Hi Simon,

I don't see anything wrong with this test locally, I get 179 expected 
passes. Could it be some difference in config?

-- 
Cheers,
Guinevere Larsen
She/Her/Hers


  reply	other threads:[~2024-01-10 17:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21 10:29 Guinevere Larsen
2023-12-22 16:34 ` Tom Tromey
2023-12-22 16:56   ` Guinevere Larsen
2024-01-02  9:24   ` Guinevere Larsen
2024-01-10 16:57 ` Simon Marchi
2024-01-10 17:01   ` Guinevere Larsen [this message]
2024-01-10 17:59     ` Tom Tromey
2024-01-11 17:02       ` Tom Tromey

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=6cfe89c3-cff0-4d56-bc96-7d8b358246fb@redhat.com \
    --to=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /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).