From 73893ac31592c180cbdd8991b51dda779c0c34fc Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sun, 6 May 2001 01:35:57 +0000 Subject: * breakpoint.c (check_duplicates): Use the breakpoint's type, not its address, to decide whether it's a watchpoint or not. Zero is a valid code address. (update_breakpoints_after_exec): Admonishing comments. * breakpoint.h (struct breakpoint): Doc fixes. --- gdb/breakpoint.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'gdb/breakpoint.h') diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index cd9d1b7a242..1ef4a799e58 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -193,16 +193,17 @@ struct breakpoint /* Number assigned to distinguish breakpoints. */ int number; - /* Address to break at, or NULL if not a breakpoint. */ + /* Address to break at. + Note that zero is a perfectly valid code address on some + platforms (for example, the mn10200 and mn10300 simulators). + NULL is not a special value for this field. */ CORE_ADDR address; - /* Line number of this address. Only matters if address is - non-NULL. */ + /* Line number of this address. */ int line_number; - /* Source file name of this address. Only matters if address is - non-NULL. */ + /* Source file name of this address. */ char *source_file; @@ -217,11 +218,10 @@ struct breakpoint control of the target insert_breakpoint and remove_breakpoint routines. No other code should assume anything about the value(s) here. */ char shadow_contents[BREAKPOINT_MAX]; - /* Nonzero if this breakpoint is now inserted. Only matters if address - is non-NULL. */ + /* Nonzero if this breakpoint is now inserted. */ char inserted; /* Nonzero if this is not the first breakpoint in the list - for the given address. Only matters if address is non-NULL. */ + for the given address. */ char duplicate; /* Chain of command lines to execute when this breakpoint is hit. */ struct command_line *commands; @@ -231,8 +231,7 @@ struct breakpoint /* Conditional. Break only if this expression's value is nonzero. */ struct expression *cond; - /* String we used to set the breakpoint (malloc'd). Only matters if - address is non-NULL. */ + /* String we used to set the breakpoint (malloc'd). */ char *addr_string; /* Language we used to set the breakpoint. */ enum language language; -- cgit v1.2.1