On 12/23/2010 06:02 AM, Ulrich Weigand wrote: > Yao Qi wrote: > >> Good catch! set_gdbarch_deprecated_fp_regnum is called in >> arm_gdbarch_init since 2003, introduced by this patch "Deprecate >> TARGET_READ_FP, read_fp and FP_REGNUM" >> http://sourceware.org/ml/gdb-patches/2003-04/msg00471.html >> >> set_gdbarch_deprecated_fp_regnum is no longer used in most of targets, >> and I don't see any reason why we have to keep it in ARM, so I draft >> this one-line patch. > > Huh, I didn't even see this, I was refering to this line: > { "fp", 11 }, > in arm_register_aliases. As long as this line is there, changes to > set_gdbarch_deprecated_fp_regnum probably don't matter as this isn't > even evaluated, since "fp" is just treated as a user register instead > of a standard register. > Ulrich, changes to set_gdbarch_deprecated_fp_regnum matters here. There are two "fp", "pc" and "sp" in user registers. The first one is added from builtin_user_regs (fp, pc, sp, ps) in user_regs_init, and the second one is added from `arm_register_aliases' in our case. The first one is always used, so these three in arm_register_aliases are redundant. { "fp", 11 }, { "sp", 13 }, { "pc", 15 }, How about this patch to remove them? > But you're right that you need to remove the set_gdbarch_deprecated_fp_regnum > *also* in order to get the full default logic I had described. > Regression test is done. Two failures are fixed. FAIL: gdb.mi/mi-var-display.exp: create variable a2 in different scope FAIL: gdb.mi/mi2-var-display.exp: create variable a2 in different scope Committed. -- Yao (齐尧)