Problem with breakpoint addresses

Daniel Jacobowitz drow@false.org
Mon Oct 30 16:44:00 GMT 2006


On Mon, Oct 30, 2006 at 04:17:02PM +0000, Andrew STUBBS wrote:
> Sorry it's taken me a little while to get back to this.
> 
> Daniel Jacobowitz wrote:
> >Secondly, this is just our use of CORE_ADDR as a native arithmetic type
> >coming home to byte us.  We knew it would someday.  I think you should
> >figure out where the sign extended CORE_ADDR was created, and why.
> >I hope it was in value_as_address.  This isn't a right final fix, but
> >could you see if setting gdbarch_integer_to_address to a function that
> >always uses extract_unsigned_integer helps?
> 
> This fix does indeed solve the problem. Thanks.
> 
> Why do you think this isn't the right final fix? I can't think of an 
> example of why this wouldn't always work until SH5, but the fix need not 
> affect that.

I can't remember how my logic went.  Should have written more of it
down.

Some day, I think we're going to need to do as Mark and Michael
suggested; stop using CORE_ADDR so indiscriminately as a convenient
integer type.  In the mean time, perhaps everywhere that doesn't
define integer_to_address should get a better default, or the fallback
case in value_as_address should be changed, so that this is fixed
equally on other platforms.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list