* symtab.h (INIT_SAL): Delete macro.
(init_sal): Export.
* symtab.c (init_sal): New function.
* ada-lang.c (ada_finish_decode_line_1): Change INIT_SAL macro
to init_sal function call.
(find_sal_from_funcs_and_line): Ditto.
(all_sals_for_line): Ditto.
* breakpoint.c (create_internal_breakpoint): Ditto.
(create_fork_vfork_event_catchpoint): Ditto.
(create_exec_event_catchpoint): Ditto.
(parse_breakpoint_sals): Ditto.
(watch_command_1): Ditto.
(handle_gnu_4_16_catch_command): Ditto.
(clear_command): Ditto.
* hppa-tdep.c (child_enable_exception_callback): Ditto.
* infcmd.c (run_stack_dummy): Ditto.
* infrun.c (process_event_stop_test): Ditto.
(check_sigtramp2): Ditto.
(step_over_function): Ditto.
* linespec.c (decode_line_2): Ditto.
(decode_line_1): Ditto.
* source.c (line_info): Ditto.
* symtab.c (find_pc_sect_line): Ditto.
+2002-10-24 Elena Zannoni <ezannoni@redhat.com>
+
+ * symtab.h (INIT_SAL): Delete macro.
+ (init_sal): Export.
+ * symtab.c (init_sal): New function.
+
+ * ada-lang.c (ada_finish_decode_line_1): Change INIT_SAL macro
+ to init_sal function call.
+ (find_sal_from_funcs_and_line): Ditto.
+ (all_sals_for_line): Ditto.
+ * breakpoint.c (create_internal_breakpoint): Ditto.
+ (create_fork_vfork_event_catchpoint): Ditto.
+ (create_exec_event_catchpoint): Ditto.
+ (parse_breakpoint_sals): Ditto.
+ (watch_command_1): Ditto.
+ (handle_gnu_4_16_catch_command): Ditto.
+ (clear_command): Ditto.
+ * hppa-tdep.c (child_enable_exception_callback): Ditto.
+ * infcmd.c (run_stack_dummy): Ditto.
+ * infrun.c (process_event_stop_test): Ditto.
+ (check_sigtramp2): Ditto.
+ (step_over_function): Ditto.
+ * linespec.c (decode_line_2): Ditto.
+ (decode_line_1): Ditto.
+ * source.c (line_info): Ditto.
+ * symtab.c (find_pc_sect_line): Ditto.
+
2002-10-24 Michal Ludvig <mludvig@suse.cz>
* dwarf2cfi.c (struct context)
#endif
struct minimal_symbol *msymbol;
- INIT_SAL (&val);
+ init_sal (&val);
msymbol = NULL;
if (lower_name != NULL)
sals.nelts = 1;
sals.sals = (struct symtab_and_line *) xmalloc (sizeof (sals.sals[0]));
- INIT_SAL (&sals.sals[0]);
+ init_sal (&sals.sals[0]);
sals.sals[0].line = best_linetable->item[best_index].line;
sals.sals[0].pc = best_linetable->item[best_index].pc;
break;
GROW_VECT (result.sals, len, result.nelts + 1);
- INIT_SAL (&result.sals[result.nelts]);
+ init_sal (&result.sals[result.nelts]);
result.sals[result.nelts].line = LINETABLE (s)->item[ind].line;
result.sals[result.nelts].pc = LINETABLE (s)->item[ind].pc;
result.sals[result.nelts].symtab = s;
struct symtab_and_line sal;
struct breakpoint *b;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sal.pc = address;
sal.section = find_pc_overlay (sal.pc);
struct breakpoint *b;
int thread = -1; /* All threads. */
- INIT_SAL (&sal);
+ init_sal (&sal);
sal.pc = 0;
sal.symtab = NULL;
sal.line = 0;
struct breakpoint *b;
int thread = -1; /* All threads. */
- INIT_SAL (&sal);
+ init_sal (&sal);
sal.pc = 0;
sal.symtab = NULL;
sal.line = 0;
if (default_breakpoint_valid)
{
struct symtab_and_line sal;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sals->sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
sal.pc = default_breakpoint_address;
enum bptype bp_type;
int mem_cnt = 0;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
/* Parse arguments. */
innermost_block = NULL;
char *save_arg;
int i;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
/* If no arg given, or if first arg is 'if ', all active catch clauses
are breakpointed. */
sals.sals = (struct symtab_and_line *)
xmalloc (sizeof (struct symtab_and_line));
make_cleanup (xfree, sals.sals);
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
sal.line = default_breakpoint_line;
sal.symtab = default_breakpoint_symtab;
sal.pc = default_breakpoint_address;
{
break_callback_sal = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line));
}
- INIT_SAL (break_callback_sal);
+ init_sal (break_callback_sal);
break_callback_sal->symtab = NULL;
break_callback_sal->pc = eh_break_addr;
break_callback_sal->line = 0;
struct breakpoint *bpt;
struct symtab_and_line sal;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
{
sal.pc = CALL_DUMMY_ADDRESS ();
/* Set up a step-resume breakpoint at the address
indicated by SKIP_SOLIB_RESOLVER. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal);
+ init_sal (&sr_sal);
sr_sal.pc = pc_after_resolver;
check_for_old_step_resume_breakpoint ();
breakpoint even though the signal happened. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal);
+ init_sal (&sr_sal);
sr_sal.symtab = NULL;
sr_sal.line = 0;
sr_sal.pc = prev_pc;
struct symtab_and_line xxx;
/* Why isn't this s_a_l called "sr_sal", like all of the
other s_a_l's where this code is duplicated? */
- INIT_SAL (&xxx); /* initialize to zeroes */
+ init_sal (&xxx); /* initialize to zeroes */
xxx.pc = tmp;
xxx.section = find_pc_overlay (xxx.pc);
check_for_old_step_resume_breakpoint ();
/* And put the step-breakpoint there and go until there. */
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = tmp;
sr_sal.section = find_pc_overlay (sr_sal.pc);
/* Do not specify what the fp should be when we stop
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = prev_pc;
sr_sal.section = find_pc_overlay (sr_sal.pc);
/* We perhaps could set the frame if we kept track of what the
else
{
/* Put the step-breakpoint there and go until there. */
- INIT_SAL (&sr_sal); /* initialize to zeroes */
+ init_sal (&sr_sal); /* initialize to zeroes */
sr_sal.pc = ecs->stop_func_start;
sr_sal.section = find_pc_overlay (ecs->stop_func_start);
/* Do not specify what the fp should be when we stop since on
{
struct symtab_and_line sr_sal;
- INIT_SAL (&sr_sal); /* initialize to zeros */
+ init_sal (&sr_sal); /* initialize to zeros */
sr_sal.pc = ADDR_BITS_REMOVE (SAVED_PC_AFTER_CALL (get_current_frame ()));
sr_sal.section = find_pc_overlay (sr_sal.pc);
printf_unfiltered ("[0] cancel\n[1] all\n");
while (i < nelts)
{
- INIT_SAL (&return_values.sals[i]); /* initialize to zeroes */
- INIT_SAL (&values.sals[i]);
+ init_sal (&return_values.sals[i]); /* initialize to zeroes */
+ init_sal (&values.sals[i]);
if (sym_arr[i] && SYMBOL_CLASS (sym_arr[i]) == LOC_BLOCK)
{
values.sals[i] = find_function_start_sal (sym_arr[i], funfirstline);
char *saved_arg = *argptr;
extern char *gdb_completer_quote_characters;
- INIT_SAL (&val); /* initialize to zeroes */
+ init_sal (&val); /* initialize to zeroes */
/* Defaults have defaults. */
CORE_ADDR start_pc, end_pc;
int i;
- INIT_SAL (&sal); /* initialize to zeroes */
+ init_sal (&sal); /* initialize to zeroes */
if (arg == 0)
{
/* OBSOLETE (SYMBOL_LANGUAGE (symbol) == language_chill */
/* OBSOLETE ? SYMBOL_CHILL_DEMANGLED_NAME (symbol) */
}
+
+/* Initialize the structure fields to zero values. */
+void
+init_sal (struct symtab_and_line *sal)
+{
+ sal->symtab = 0;
+ sal->section = 0;
+ sal->line = 0;
+ sal->pc = 0;
+ sal->end = 0;
+}
\f
But what we want is the statement containing the instruction.
Fudge the pc to make sure we get that. */
- INIT_SAL (&val); /* initialize to zeroes */
+ init_sal (&val); /* initialize to zeroes */
/* It's tempting to assume that, if we can't find debugging info for
any function enclosing PC, that we shouldn't search for line
CORE_ADDR end;
};
-#define INIT_SAL(sal) { \
- (sal)->symtab = 0; \
- (sal)->section = 0; \
- (sal)->line = 0; \
- (sal)->pc = 0; \
- (sal)->end = 0; \
-}
+extern void init_sal (struct symtab_and_line *sal);
struct symtabs_and_lines
{