[hatari-devel] Number/address handling change in DebugUI
Eero Tamminen
eerot at users.berlios.de
Sun Jul 19 15:47:12 CEST 2009
Hi,
On Saturday 18 July 2009, Eero Tamminen wrote:
> On Saturday 18 July 2009, Thomas Huth wrote:
> > Now it's just a little bit confusing that the "b" command requires "$"
> > prefix for hexadecimal values while all other commands do not require a
> > prefix... Maybe we should add the requirement for the "$" prefix for
> > the other commands, too? What do you think?
>
> Hm. I could move the decimal / hexadecimal ($-prefix) / binary
> (%-prefix) parsing function from breakcond.c to debugui.c and change
> everything in DebugUI to use it... I'll look into that.
I moved the dec/bin/hex handling from breakcond.c to str.c along with
the address range parsing from debugui.c. Then I changed breakcond.c
and debugui.c to use these new string functions:
- Str_GetNumber()
- Str_ParseRange()
which understand the prefixes.
Now all the numbers in the debugger are understood as decimal unless
they're prefixed with '$' (for hexadecimal) or '%' (for binary decimal).
(only exception are the data bytes given to the memwrite command, I thought
it better to keep them still as hex. I think that kind of data is mostly
given as hexadecimals and entering '$' for all the values could get quite
tedious...)
I also added a "value" ("v") helper command which shows the given number
in the supported bin/dec/hex number bases.
Some other debugui.c changes:
- changed remaining unsigned longs to (more correct) Uint32
(needed by prefix supporting functions)
- renamed nBreakPoint variable to more descriptive BreakAddr
(in address based breakpoint functions)
- Eero
More information about the hatari-devel
mailing list