
Get GDB to stop at Unaligned access
|> I'm trying to build an app under OSF 1.3 on an Alpha. Can
|> anyone tell me how to get gdb or dbx to stop at the C line
|> causing an 'Unaligned access' error message to be printed?
|>
using the pc in the unaligned access message, in dbx:
(dbx) 0xyyyyyyyy/i
where yyyyyyyy is the address of the pc in the message. This will tell
you the function and line where the unaligned access occured. To stop
at that point:
stopi at 0xyyyyyyyy
|> In case someone as seen my problem, let me describe it.
|> When I use gdb to stop at the pc contained in an unaligned
|> access message (via 'break *0x1a2b3c4d5'), it claims the error
|> comes from a line where I've got a link list and I'm trying
|> to set a pointer to NULL; like
|>
|> head->next->next = (struct_type *) NULL;
|>
is one of your nexts an int ?
|> I don't see why an assignment should cause this kind of error!
|> Any one seen this or know how I can investigate further?
|
It only does if one of the "addresses" in not on a pointer boundry.
It is quite possible that head or head->next is not on a proper
boundry but is pointing to something that is not fatal.