question about vCont behavior #158
Replies: 5 comments 4 replies
-
Sure, I don't mind offering some thoughts here, even if this isn't strictly From my experience, GDB is pretty inconsistent in how it models step, continue, and breakpoint semantics across different targets. e.g: a packet sequence in response to a high-level My interpretation of Another thing you should do is enable packet debugging on the GDB-side (and if possible, on your stub side), to see what sorts of packets (if any) are flying around while you're "super spinning". From the GDB-side, this can be done by invoking Hope some of these thoughts / observations are useful. Implementing a gdbstub from scratch is, unfortunately, a painful experience... and one that I hope P.S: I'm actually a long-time subscriber of yours on YouTube, and love all the projects you hack on! |
Beta Was this translation helpful? Give feedback.
-
That makes me really sad that the behavior is inconsistent. These are all very interesting points. I have been enabling packet debugging this whole time, just have had a lot of trouble regardless. Thank you for the kind words, as well! I am really starting to do my best to support a sort of minimal-SDK environment for chips, starting with the ch32v-series parts. And while I only use printf debugging a lot of other people use gdb. It was really easy to implement, except for this stepping behavior. It has absolutely driven me up a wall. In retrospect, it is starting to look like I should not have added |
Beta Was this translation helpful? Give feedback.
-
So, I advertise as hwbreak+, because I want to get Z/z commands. But, they are ultimately swbreak+ breakpoints. Is there any issue with that? |
Beta Was this translation helpful? Give feedback.
-
Will test it. |
Beta Was this translation helpful? Give feedback.
-
There is no discernible difference. |
Beta Was this translation helpful? Give feedback.
-
I am here not directly with this issue, but with
vCont
in general, I am having an issue with "next" in gdb, whennext
ing over functions with deep inner loops. Without vCont, it starts stepping and sits there spinning for extremely long periods of time (minutes). When I just want to go "next".But if I stub in vCont, say by replying with
vCont;c;C;s;S
, and then I "next" in gdb, I GetvCont;s:1;c#
I can't figure out what GDB is trying to get me to do there. Some people online are saying that's a single step, but if I do single step with that, it just super spins. It doesn't make sense to me... How does gdb avoid spending minutes stepping through with other gdb servers?
If I interpret
vCont;s:1;c
as step once then continue, it runs for a bit then gdb breaks execution later.If I interpret
vCont;s:1;c
as single-step, the behavior is no different than if I make no changes, and gdb just spins...Originally posted by @cnlohr in #152 (comment)
Beta Was this translation helpful? Give feedback.
All reactions