From 2e7eeba99de6891ada5f4b4661ecb4a9b1084038 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 29 Oct 1998 18:07:01 +0000 Subject: Thu Oct 29 10:04:20 1998 Michael Snyder [Support for trace debugging: registers that were not collected.] * remote.c (remote_fetch_registers): accept 'xxxx' in the register packet, with the meaning "register value is not available". Set register_valid to -1, which will connote "no value available". * findvar.c (read_relative_register_raw_bytes): return failure if register_valid == -1. (value_of_register): return failure if register_valid == -1. (read_var_value): return error if value_of_register fails for a register variable. (value_from_register): return failure if register_valid == -1. * eval.c (evaluate_subexp_standard): return error if value_of_register fails for a register used in an expression. * infcmd.c (do_registers_info): display "value not available" for registers for which register_valid == -1. * tracepoint.c (set_raw_tracepoint): just save the filename as is from the symbol table, rather than trying to prepend the dir name. Also save the bfd section. (tracepoints_info): use the section when looking up the function name. * tracepoint.h: add section field to tracepoint struct. --- gdb/tracepoint.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'gdb/tracepoint.c') diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index d7978dd..e19485f 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -332,30 +332,11 @@ set_raw_tracepoint (sal) if (sal.symtab == NULL) t->source_file = NULL; else - { - if (sal.symtab->dirname == NULL) - { - t->source_file = (char *) xmalloc (strlen (sal.symtab->filename) + 1); - strcpy (t->source_file, sal.symtab->filename); - } - else - { - char *p; - - t->source_file = (char *) xmalloc (strlen (sal.symtab->filename) + - strlen (sal.symtab->dirname) + 2); - - strcpy (t->source_file, sal.symtab->dirname); - p = t->source_file; - while (*p) - p++; - if (*(--p) != '/') /* Will this work on Windows? */ - strcat (t->source_file, "/"); - strcat (t->source_file, sal.symtab->filename); - } - } + t->source_file = savestring (sal.symtab->filename, + strlen (sal.symtab->filename)); - t->language = current_language->la_language; + t->section = sal.section; + t->language = current_language->la_language; t->input_radix = input_radix; t->line_number = sal.line; t->enabled = enabled; @@ -503,7 +484,7 @@ tracepoints_info (tpnum_exp, from_tty) if (t->source_file) { - sym = find_pc_function (t->address); + sym = find_pc_sect_function (t->address, t->section); if (sym) { fputs_filtered ("in ", gdb_stdout); -- cgit v1.1