This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Deprecate read_register_gen() / write_register_gen()


On Sat, Nov 02, 2002 at 09:48:03AM -0500, Andrew Cagney wrote:

These functions are now really redundant - equivalent regcache variants are available. Apart from the fringes (-tdep files) there are hardly any references left.

When you deprecate without removing, would you mind adding a pointer to
the replacement interfaces in headers near the declaration?  Otherwise
the remaining references are a pain for individual maintainers to clean
up later.
I forgot :-( I'll add something but it's going to be pretty wishy washy :-( The problem is that the obvious change, vis:
read_register_gen (regnum, buf);
to:
regcache_cooked_read (current_regcache, regnum, buf)
is wrong. Invariably, the containing function is what really needs an overhaul, vis:

static void
mips_push_register (CORE_ADDR * sp, int regno)
{
....
deprecated_read_register_gen (regno, buffer);
write_memory (*sp, buffer + offset, regsize);
}

(this should be parameterized with a register cache).

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]