Summary: | replay mode should not or only optionally enter code executed by call() | ||
---|---|---|---|
Product: | gdb | Reporter: | Andre' <andre.poenitz> |
Component: | backtrace | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | UNCONFIRMED --- | ||
Severity: | enhancement | CC: | gdb-prs, msnyder, teawater |
Priority: | P2 | ||
Version: | unknown | ||
Target Milestone: | 6.8 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Andre'
2009-09-23 12:20:43 UTC
Do you mean disable record in "call" command? Yes. I think record the most of memory and reg change is better. If it affect something, could you please give a example? I use call() to extract information from the inferior after each stop (be it triggered by a breakpoint or by stepping). The result is pretty much what the Python pretty printers do, except that the code is run natively in the inferior and I therefore do not have to deploy Python. With call() activity being recorded I am basically unable to step backwards as I always end up in my helper code. I think add a switch for prec to close record in call() can handle it. Do you think it's OK? Michael, what do you think about it? Thanks, Hui Subject: Re: replay mode should not or only optionally
enter code executed by call()
teawater at gmail dot com wrote:
> ------- Additional Comments From teawater at gmail dot com 2009-10-10 02:42 -------
> I think add a switch for prec to close record in call() can handle it.
>
> Do you think it's OK?
>
> Michael, what do you think about it?
Well, this actually brings up a number of related questions.
What if, during the recording, the user makes changes such as:
* Change memory
* Change registers
* Change the course of execution, eg. by
- change the PC
- "jump" command
- "call" command
I think if user changes memory or registers, you record that.
Right?
And if user changes PC, or uses "jump" command, we will
record it also, right?
So in that case, it seems like we should also record the
"call" command.
If the call() call the function that will not change the global value (some memory), it will change the most of registers (for example: pc) to the value before call(). Subject: Re: replay mode should not or only optionally
enter code executed by call()
teawater at gmail dot com wrote:
> ------- Additional Comments From teawater at gmail dot com 2009-10-12 07:15 -------
> If the call() call the function that will not change the global value (some
> memory), it will change the most of registers (for example: pc) to the value
> before call().
>
Oh yeah, sorry, I mis-understood you. I thought you were talking
about record mode.
Yes, during replay mode, any "call" will certainly fail.
But I don't worry about it, because, well, it will fail.
Call will try to change the PC, as you say, and that will
error out.
You would like to catch the error earlier?
Sorry I didn't talk it very clear. I am talking about record mode. "call()" will not change the a lot of memory (we can ignore stack change) and register (gdb will change them back). So maybe we can ignore record the "call()" code. |