[Libguestfs] [PATCH libnbd 0/3] generator: Reset line directive after included code in lib/states.c
Eric Blake
eblake at redhat.com
Fri Dec 3 19:56:02 UTC 2021
On Fri, Dec 03, 2021 at 07:38:49PM +0000, Richard W.M. Jones wrote:
> > Alas, generator/states.c. Here's how I tested. In particular, note
> > that you MUST use an off-by-one #line directive for the current file
> > (the directive #line 10 must appear on line 9, for gdb to display the
> > code at line 10 on the next step of the program).
>
> In that case, patch 3 needs something like:
>
> - let output_loc = "lib/states.c", output_lineno () in
> + let output_loc = "lib/states.c", output_lineno () + 1 in
Yep, with that change, my gdb session single-stepping through the
state machine lines up with the code being executed. ACK series, and
thanks for tackling this!
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list