From 53cb0458d6870af83b2bc9fab8738a29b64f702e Mon Sep 17 00:00:00 2001 From: Fernando Nasser Date: Sun, 22 Sep 2002 22:18:41 +0000 Subject: * source.c (get_current_or_default_source_symtab_and_line): Remove function. (set_default_source_symtab_and_line): New function. Attempts to determine a source file to list lines from if one is not currently defined. (get_current_source_symtab_and_line): Initialize sal.pc and sal.end fields. (set_current_source_symtab_and_line): Mark argument as const. * source.h: Update declarations and comments. * linespec.c (decode_line_1): Replace call to removed routine above. * stack.c (print_frame_info_base): Ditto. * cli/cli-cmds.c (edit_command): Ditto. (list_command): Ditto. --- gdb/cli/cli-cmds.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gdb/cli/cli-cmds.c') diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 0b5b857..c44975a 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -552,7 +552,10 @@ edit_command (char *arg, int from_tty) /* Pull in the current default source line if necessary */ if (arg == 0) - sal = get_current_or_default_source_symtab_and_line (); + { + set_default_source_symtab_and_line (); + sal = get_current_source_symtab_and_line (); + } /* bare "edit" edits file with present line. */ @@ -655,7 +658,10 @@ list_command (char *arg, int from_tty) /* Pull in the current default source line if necessary */ if (arg == 0 || arg[0] == '+' || arg[0] == '-') - cursal = get_current_or_default_source_symtab_and_line (); + { + set_default_source_symtab_and_line (); + cursal = get_current_source_symtab_and_line (); + } /* "l" or "l +" lists next ten lines. */ -- cgit v1.1