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

target/riscv: gdb_regno_name takes an enum. #953

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Conversation

timsifive
Copy link
Collaborator

Otherwise it won't compile for me. Not sure why that doesn't affect the automated builds.

Change-Id: Ic66c743e1698c4c0772e5601723cb5c711b4fa5c

Otherwise it won't compile for me. Not sure why that doesn't affect the
automated builds.

Change-Id: Ic66c743e1698c4c0772e5601723cb5c711b4fa5c
Signed-off-by: Tim Newsome <tim@sifive.com>
@timsifive
Copy link
Collaborator Author

@AnastasiyaChernikova

Copy link
Collaborator

@JanMatCodasip JanMatCodasip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a mismatch between declaration of gdb_regno_name():

src/target/riscv/gdb_regs.h:123:const char *gdb_regno_name(struct target *target, enum gdb_regno regno);

and the definition:

src/target/riscv/riscv.c:5542:const char *gdb_regno_name(struct target *target, unsigned int regno)

So this fix is definitely correct. I assume that depending on compiler version and -Werror strictness the compiler may complain.

Out of curiosity, I tried two GCC versions locally (8.5.0 and 12.2.1) but wasn't able to reproduce it.

@timsifive
Copy link
Collaborator Author

FWIW, I'm running gcc (GCC) 13.2.1 20230801

@timsifive timsifive merged commit 839f292 into riscv Nov 6, 2023
5 checks passed
@timsifive timsifive deleted the regno_name_enum branch November 6, 2023 17:17
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