This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Extending RSP with vCont;n and vCont;f
- From: "ILG.Robert" <R dot ILG at bachmann dot info>
- To: "yao at codesourcery dot com" <yao at codesourcery dot com>, "palves at redhat dot com" <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 23 Oct 2013 07:19:07 +0000
- Subject: Re: Extending RSP with vCont;n and vCont;f
- Authentication-results: sourceware.org; auth=none
As the question concerning the proposed patch has passed silently within the mass of requests, I dare to post it again.
How does GDB cope with read-only code, that does not allow to insert breakpoints?
Here the problem is described in more detail:
> All the same "finish" is needed in order to handle the GDB "finish" correctly.
> Remember that our target cannot insert breakpoints to system code, like
> other targets cannot alter read-only memory. So if you trigger the system
> to call a call-back function of your code, you cannot step back. The Stack
> would look like this:
> MyCode1-->SystemCode2-->...-->Systemcode4-->MyCode5.
> As you cannot insert a breakpoint to SystemCode4 there is no way to
> "finish" until MyCode1. In such a case GDB or the target need to realize
> that the code in between cannot be controlled with breakpoints and
> therefore the breakpoint needs to be set to the return address of MyCode1
> - skipping all code in between. GDB does not skip unknown code at the
> moment, so the question is whether skipping unknown Code has to be done
> by GDB or by the target (remote by using "finish").
>
> So the real questions are:
> Is it intended to skip unknown/read-only code in GDB?
> If yes, has it to be solved within GDB or within the target?
Thanks.