From: Jim Wilson <jimw@sifive.com>
To: gdb@sourceware.org
Subject: RISC-V and fake function debug info in the testsuite
Date: Sat, 13 Apr 2019 00:17:00 -0000 [thread overview]
Message-ID: <CAFyWVaY+CMukKrSvtBAuxWQaFrm-WW3Ps2VOd+Xa6pRX4942XQ@mail.gmail.com> (raw)
Some of the testsuite testcases construct debug info for functions
that don't exist using Dwarf::assemble. This is causing trouble for
riscv64-linux.
The problem here is that we have two types of breakpoints, 2-byte and
4-byte. The easy way to tell which one is safe to use is to read from
target memory. But if we have debug info for a function that doesn't
exist, pointing at memory locations that don't exist, then reading
target memory at that address fails, causing the breakpoint command to
fail.
This feature can be turned off, and gdb forced to always use a 2-byte
or 4-byte breakpoint which does not require reading target memory. I
tried this, and found that this fixed 46 testsuite failures in
gdb.cp/nsalias.exp and 1 testsuite failure in
gdb.dwarf2/inlined_subroutine-inheritance.exp.
The question is what to do next. I don't want to turn this feature
off by default for the testsuite, as we should be testing it. We
could modify the two testcases to add RISC-V specific support that
turns the feature off for these testcases. We just need to send one
command to gdb at the start "set riscv use-compressed-breakopints on"
or off but not auto which is the default. Or maybe there is a more
general way that we can fix this?
Jim
next reply other threads:[~2019-04-13 0:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-13 0:17 Jim Wilson [this message]
2019-04-13 18:18 ` Jim Wilson
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=CAFyWVaY+CMukKrSvtBAuxWQaFrm-WW3Ps2VOd+Xa6pRX4942XQ@mail.gmail.com \
--to=jimw@sifive.com \
--cc=gdb@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