This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Extending RSP with vCont;n and vCont;f


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]