> On Aug 12, 4:12pm, Daniel Jacobowitz wrote: > > >> > I think the change is ok (i386 shows no regressions, the mips doesn't >> > use this code :-). I'm just wondering about the names. Perhaps: >> > regcache_cooked_read_signed() & regcache_cooked_read_unsigned()? >> > >> > thoughts? > >> >> Hmm, I like _read_signed and _read_unsigned... the _as_longest bit is >> implicit. > > > I agree with Daniel. Good enough for me. I took the liberty of revising the exact interface. It uses a reference parameter, rather than function return, when passing back the result. The comment: +/* NOTE: cagney/2002-08-13: At present GDB has no reliable mechanism + for indicating when a ``cooked'' register was constructed from + invalid or unavailable ``raw'' registers. One fairly easy way of + adding such a mechanism would be for the cooked functions to return + a register valid indication. Given the possibility of such a + change, the extract functions below use a reference parameter, + rather than a function result. */ explains why. I should note that this is a somewhat pervasive problem in GDB, there are few checks to ensure that a register is valid and those that do, check the raw register cache :-( enjoy, Andrew