mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
* findvar.c: Include "builtin-regs.h".
(value_of_register): Call value_of_builtin_reg when applicable. * parse.c: Include "builtin-regs.h" and "gdb_assert.h". (target_map_name_to_register): Call builtin_reg_map_name_to_regnum. * Makefile.in (SFILES): Add builtin-regs.c and std-regs.c. (COMMON_OBS): Add builtin-regs.o and std-regs.o. (builtin_regs_h): Define. (builtin-regs.o): New target. (findvar.o): Add $(builtin_regs_h). * builtin-regs.c, builtin-regs.h: New files. * std-regs.c: New file. Partial fix for PR gdb/251.
This commit is contained in:
@ -33,6 +33,7 @@
|
||||
#include "floatformat.h"
|
||||
#include "symfile.h" /* for overlay functions */
|
||||
#include "regcache.h"
|
||||
#include "builtin-regs.h"
|
||||
|
||||
/* Basic byte-swapping routines. GDB has needed these for a long time...
|
||||
All extract a target-format integer at ADDR which is LEN bytes long. */
|
||||
@ -299,6 +300,11 @@ value_of_register (int regnum, struct frame_info *frame)
|
||||
char *raw_buffer = (char*) alloca (MAX_REGISTER_RAW_SIZE);
|
||||
enum lval_type lval;
|
||||
|
||||
/* Builtin registers lie completly outside of the range of normal
|
||||
registers. Catch them early so that the target never sees them. */
|
||||
if (regnum >= NUM_REGS + NUM_PSEUDO_REGS)
|
||||
return value_of_builtin_reg (regnum, selected_frame);
|
||||
|
||||
get_saved_register (raw_buffer, &optim, &addr,
|
||||
frame, regnum, &lval);
|
||||
|
||||
|
Reference in New Issue
Block a user