Skip to content

Conversation

stefanct
Copy link

This is a backport of a patch that has been applied to the riscv GDB repo almost 3 years ago. I was annoyed enough to bisect what was causing the following error to continue to use the pulp fork (however, I wonder if this is even necessary - it would be nice to know what the fork offers that riscv upstream does not).

This fixes:

internal-error: const char* tdesc_register_name(gdbarch*, int): Assertion `data->pseudo_register_name != NULL' failed.

The code making use of pseudo registers was initially intended to
support running 32-bit ABI files on 64-bit riscv targets. However, the
implementation was incomplete, and broken.

For now I've removed all reference to pseudo registers from the riscv
target, we've not lost any functionality, and this cleans up failures in
the selftests.

Once the riscv target has matured a little we'll probably end up
bringing back some of the use of pseudo registers in order to better
support running 32-bit executables on a 64-bit target.

The code making use of pseudo registers was initially intended to
support running 32-bit ABI files on 64-bit riscv targets.  However, the
implementation was incomplete, and broken.

For now I've removed all reference to pseudo registers from the riscv
target, we've not lost any functionality, and this cleans up failures in
the selftests.

Once the riscv target has matured a little we'll probably end up
bringing back some of the use of pseudo registers in order to better
support running 32-bit executables on a 64-bit target.

gdb/ChangeLog:

	* riscv-tdep.c (riscv_pseudo_register_read): Delete.
	(riscv_pseudo_register_write): Delete.
	(riscv_gdbarch_init): Remove all use of pseudo registers.
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