Skip to content

gdbstub: Export helper to use GDB errno values

Yodel Eldar qemu-devel 1 version Applied

Status from this message: Queued to gdbstub/next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest3 patches 7 repliesApplied

Changes in v3 from the cover letter

No functional changes
- Rebase on mainline (no conflicts)
- Collect R-b's (Thanks, Richard)
- Minor rewording of commit messages

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3include/gdbstub/syscalls: Add EIO and ENOSYS GDB File-I/O errno valuesinclude/gdbstub/syscalls.h+2 -01 reply
2/3gdbstub: Export host_to_gdb_errno File-I/O helper functiongdbstub/syscalls.c include/gdbstub/syscalls.h target/m68k/m68k-semi.c+45 -291 reply
3/3gdbstub/user-target: Convert host errno to GDB File-I/O errnogdbstub/user-target.c+9 -41 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonPhilippe Mathieu-Daudé
1/3R-b R-b
2/3R-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] gdbstub: Export helper to use GDB errno values

Currently, F reply packets in gdbstub/user-target.c emit the host's errno values [1], but to facilitate host<->target independence the GDB File-I/O protocol defines its own set of supported errno values that should be used in replies instead.

Patch 1 adds two GDB File-I/O errno values that were previously undocumented despite having support.

Patch 2 exports a mapping helper function statically defined in m68k-dependent code by declaring it in include/gdbstub/syscalls.h with the GDB File-I/O errno values, and moving the definition to gdbstub/syscalls.c.

Patch 3 passes the host errnos to the newly global mapping function before emitting the result in F reply packets. This is the only patch that still needs review, although it is somewhat similar to the v1 version that Alex reviewed.

I'm resending instead of just pinging, because there were DKIM-signing issues last time, and that led to From-munging of the emails which could be problematic for tooling. I believe that problem's resolved now.

Besides the DKIM-signing issue, the bashism in the commit title of Patch 1 was getting mangled with a spurious space presumably by Mailman, so I've also changed it, despite my partiality for bashisms as that also would've caused DKIM verification failure and possible munging.

Thanks to Richard for the reviews in v2 and for having written that nice helper function exported and used in this series.

Thanks to Alex for the review of v1 that is now Patch 3. I wanted to collect your R-b, but the patch underwent nontrivial change in v2, so I left it out in case you had objections to those changes.

Changes in v3:
No functional changes
- Rebase on mainline (no conflicts)
- Collect R-b's (Thanks, Richard)
- Minor rewording of commit messages

Changes in v2:
- New patch adding two errno values
- New patch exporting helper function that maps errno values

Link to v2:
https://lore.kernel.org/qemu-devel/[email protected]/
Link to v1:
https://lore.kernel.org/qemu-devel/[email protected]/

[1] https://gitlab.com/qemu-project/qemu/-/issues/2751

Thanks,
Yodel

Yodel Eldar (3):
include/gdbstub/syscalls: Add EIO and ENOSYS GDB File-I/O errno values
gdbstub: Export host_to_gdb_errno File-I/O helper function gdbstub/user-target: Convert host errno to GDB File-I/O errno

 gdbstub/syscalls.c         | 36 ++++++++++++++++++++++++++++++++++++
 gdbstub/user-target.c      | 13 +++++++++----
 include/gdbstub/syscalls.h | 11 +++++++++++
 target/m68k/m68k-semi.c    | 29 -----------------------------
 4 files changed, 56 insertions(+), 33 deletions(-)
Signature · 1 line
2.52.0