Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GDB stub builds due to undeclared symbol #3655

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

Theldus
Copy link
Contributor

@Theldus Theldus commented Aug 30, 2023

Summary

This PR fixes a build issue that occurred while building with GDB stub support (-DGDBSTUB=ON) enabled, as can be seen in:

$ cmake -DGDBSTUB=ON ..
...
$ make
...
/home/david/86Box/src/gdbstub.c: In function ‘gdbstub_client_write_reg’:
/home/david/86Box/src/gdbstub.c:551:14: error: ‘GDB_REG_FS_BASE’ undeclared (first use in this function); did you mean ‘GDB_REG_FSTAT’?
  551 |         case GDB_REG_FS_BASE ... GDB_REG_GS_BASE:
      |              ^~~~~~~~~~~~~~~
      |              GDB_REG_FSTAT

The issue was introduced in commit 565421a, which commented out the GDB_REG_FS_BASE and GDB_REG_GS_BASE registers, but did not remove the code snippets that referenced them in gdbstub_client_write_reg(). This PR comments out those code snippets as well.

Additionally, I've removed the fs_base and gs_base registers from the XML file, to ensure the correct numbering of the registers for the GDB.


Note: I have three other small patches for gdbstub.c, should I submit them in separate PRs or is one enough?

Checklist

References

This commit fixes a build issue that occurred when compiling with
GDBSTUB support (-DGDBSTUB=ON). The issue was introduced in commit
565421a, which commented out the GDB_REG_FS_BASE and GDB_REG_GS_BASE
registers, but did not remove the code snippets that referenced them
in gdbstub_client_write_reg(). This commit comments out those code
snippets as well.

Additionally, this commit removes the fs_base and gs_base registers
from the XML file, to ensure the correct numbering of the registers
for the GDB.
@OBattler OBattler merged commit b6713dc into 86Box:master Aug 31, 2023
60 of 64 checks passed
@OBattler
Copy link
Member

I recommend making another PR witth those patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants