Skip to content

Fix GDB stub builds due to undeclared symbol#3655

Merged
OBattler merged 1 commit into
86Box:masterfrom
Theldus:fix_gdbstub_build
Aug 31, 2023
Merged

Fix GDB stub builds due to undeclared symbol#3655
OBattler merged 1 commit into
86Box:masterfrom
Theldus:fix_gdbstub_build

Conversation

@Theldus

@Theldus Theldus commented Aug 30, 2023

Copy link
Copy Markdown
Contributor

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
@OBattler

Copy link
Copy Markdown
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