From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH 9/9] gdb/testsuite/dap: fix gdb.dap/basic-dap.exp disassembly test for PIE
Date: Wed, 25 Jan 2023 15:10:03 -0700 [thread overview]
Message-ID: <875ycutgec.fsf@tromey.com> (raw)
In-Reply-To: <20230106185729.42372-10-simon.marchi@efficios.com> (Simon Marchi via Gdb-patches's message of "Fri, 6 Jan 2023 13:57:29 -0500")
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>>>> {... {"memoryReference": "0x115d"
Simon> The problem is that the PC to disassemble is taken from the breakpoint
Simon> insertion response, which happens before running. With a PIE
Simon> executable, that PC is unrelocated, but the disassembly request happens
Simon> after relocation.
This is an odd one. It isn't super clear when memory references are
invalidated. (The spec doesn't even define what a memory reference is.)
Simon> I chose to fix this by watching for a breakpoint changed event giving
Simon> the new breakpoint address, and recording the address from there. I
Simon> think this is an interesting way to fix it, because it adds a bit of
Simon> test coverage, I don't think these events are checked right now.
This seems pretty good to me.
Simon> - Do the disassembly by symbol instead of by address.
I don't think this is possible in DAP. One of the many holes.
Tom
next prev parent reply other threads:[~2023-01-25 22:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 18:57 [PATCH 0/9] Fix gdb.dap/basic-dap.exp " Simon Marchi
2023-01-06 18:57 ` [PATCH 1/9] gdb/testsuite/dap: use gdb_assert in gdb.dap/basic-dap.exp Simon Marchi
2023-01-25 21:58 ` Tom Tromey
2023-01-06 18:57 ` [PATCH 2/9] gdb/testsuite/dap: prefix some procs with _ Simon Marchi
2023-01-25 21:59 ` Tom Tromey
2023-01-06 18:57 ` [PATCH 3/9] gdb/testsuite/dap: write requests to gdb.log Simon Marchi
2023-01-25 21:59 ` Tom Tromey
2023-01-25 22:01 ` Tom Tromey
2023-01-26 3:01 ` Simon Marchi
2023-01-06 18:57 ` [PATCH 4/9] gdb/testsuite/dap: make dap_request_and_response not catch / issue test result Simon Marchi
2023-01-06 18:57 ` [PATCH 5/9] gdb/testsuite/dap: remove catch from dap_read_event Simon Marchi
2023-01-06 18:57 ` [PATCH 6/9] gdb/testsuite/dap: pass around dicts instead of ton objects Simon Marchi
2023-01-25 22:04 ` Tom Tromey
2023-01-26 3:29 ` Simon Marchi
2023-01-26 14:55 ` Tom Tromey
2023-01-06 18:57 ` [PATCH 7/9] gdb/testsuite/dap: rename dap_read_event to dap_wait_for_event_and_check Simon Marchi
2023-01-06 18:57 ` [PATCH 8/9] gdb/testsuite/dap: make dap_wait_for_event_and_check return preceding messages Simon Marchi
2023-01-06 18:57 ` [PATCH 9/9] gdb/testsuite/dap: fix gdb.dap/basic-dap.exp disassembly test for PIE Simon Marchi
2023-01-25 22:10 ` Tom Tromey [this message]
2023-01-26 3:40 ` Simon Marchi
2023-01-26 15:08 ` Tom Tromey
2023-01-26 20:21 ` Simon Marchi
2023-01-16 16:07 ` [PATCH 0/9] Fix gdb.dap/basic-dap.exp " Simon Marchi
2023-01-25 22:10 ` Tom Tromey
2023-01-26 20:22 ` Simon Marchi
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=875ycutgec.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).