ecb65f66c6
On all of our platforms, db_expr_t is a signed integer while db_addr_t is an unsigned integer value. db_search_symbol used variables of type db_expr_t to hold the current offset of the requested address from the "best" symbol found so far. This value was initialized to '~0'. When a new symbol is found from a symbol table, the associated diff for the new symbol is compared against the existing value as 'if (newdiff < diff)' to determine if the new symbol had a smaller diff and was thus a closer match. On 64-bit MIPS, the '~0' was treated as a negative value (-1). A lookup that found a perfect match of an address against a symbol returned a diff of 0. However, in signed comparisons, 0 is not less than -1. As a result, DDB on 64-bit MIPS never resolved any addresses to symbols. Workaround this by using casts to force an unsigned comparison. Probably the diff returned from db_search_symbol() and X_db_search_symbol() should be changed to a db_addr_t instead of a db_expr_t as it is an unsigned value (and is an offset of an address, so should fit in the same size as an address). Sponsored by: DARPA / AFRL |
||
---|---|---|
.. | ||
db_access.c | ||
db_access.h | ||
db_break.c | ||
db_break.h | ||
db_capture.c | ||
db_command.c | ||
db_command.h | ||
db_examine.c | ||
db_expr.c | ||
db_input.c | ||
db_lex.c | ||
db_lex.h | ||
db_main.c | ||
db_output.c | ||
db_output.h | ||
db_print.c | ||
db_ps.c | ||
db_run.c | ||
db_script.c | ||
db_sym.c | ||
db_sym.h | ||
db_textdump.c | ||
db_thread.c | ||
db_variables.c | ||
db_variables.h | ||
db_watch.c | ||
db_watch.h | ||
db_write_cmd.c | ||
ddb.h |