Workaround for long long types in breakpoint code.

From: Rod Armstrong (
Date: Wed Mar 07 2001 - 19:26:36 GMT

Because the interpreter does not support long long types, there is a trick for
making conditional breakpoints for such numbers.
The workaround is to use pointers in breakpoint code (not sure if this has
been mentioned before).
You can check all 8 bytes by casting each 4 bytes to a long.
This assumes the 8 bytes are contiguous - works on Solaris, but
may not for Linux.

eg if long long ll = 0x123456789abcdef0 use this for a conditional breakpoint:

if(*((long*)&ll)==0x12345678 && *((long*)&ll+1)==0x9abcdef0) #stop;

    You could make an editing macro to simplify it:

setenv UPS_F1_STR '^e^uif(*((long*)&^y)==0x0 && *((long*)&^y+1)==0x0) #stop;'

1. Create a breakpoint (#stop;).
2. Select the variable (ll).
3. Middle click anywhere in the stop line, then right click.


This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:51:33 GMT