This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: read target register to decide breakpoint size
- From: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: Tim Newsome <tim at sifive dot com>, Antoine Tremblay <antoine dot tremblay at ericsson dot com>, gdb <gdb at sourceware dot org>
- Date: Wed, 14 Dec 2016 13:15:23 -0500
- Subject: Re: read target register to decide breakpoint size
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=antoine dot tremblay at ericsson dot com;
- References: <CAGDihemd3g3_ropX=Y-wWSeyWBbH-sCA6FDX2FaTwKP8e-3Nng@mail.gmail.com> <wwok1sy4zt6d.fsf@ericsson.com> <CAGDihe=cyG646+D1POAaBSiWYAxH_ap+C0j=+hxVBdZq1N0LBA@mail.gmail.com> <CAGDihemhV1jvCoP5bQnmFqqrSCP7=M9OyzkeyLB=-kj5UpgAoQ@mail.gmail.com> <CAGDihemz5vACCHsxK6WtFOwPYhKr5h1-bU+yKLdvZqYgjGng6g@mail.gmail.com> <20161214091811.GH25542@E107787-LIN> <wwokeg1aofnb.fsf@ericsson.com> <CAGDihe=PR+4BfaV3jYThnmTtLZ=iQeKPp_W2TiEKgvbWJv-KyQ@mail.gmail.com> <20161214172222.GK25542@E107787-LIN>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Yao Qi writes:
> On 16-12-14 09:01:53, Tim Newsome wrote:
>>
>> Thank you, sounds like reading MISA from kind_from_pc should work out
>> fine then (unless Yao has an objection we didn't consider).
>
> You can't set breakpoint without the live inferior in this way.
>
> ./gdb a.out
> (gdb) b main
I wonder if GDB could fallback to ELF if the register can't be read ?
Not sure how that would be done...