diff options
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r-- | gdb/tracepoint.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index e9bcbfd..c0f1eae 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -1,6 +1,6 @@ /* Tracing functionality for remote targets in custom GDB protocol - Copyright (C) 1997-2024 Free Software Foundation, Inc. + Copyright (C) 1997-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -671,7 +671,7 @@ validate_actionline (const char *line, tracepoint *t) p = strchr (p, ','); continue; } - /* else fall thru, treat p as an expression and parse it! */ + /* else fall through, treat p as an expression and parse it! */ } tmp_p = p; for (bp_location &loc : t->locations ()) @@ -2110,7 +2110,7 @@ tfind_1 (enum trace_find_type type, int num, if you're in a user-defined command or especially in a loop, then you need a way to detect that the command failed WITHOUT aborting. This allows you to write - scripts that search thru the trace buffer until the end, + scripts that search through the trace buffer until the end, and then continue on to do something else. */ if (from_tty) @@ -2351,8 +2351,9 @@ tfind_line_command (const char *args, int from_tty) { if (start_pc == end_pc) { - gdb_printf ("Line %d of \"%s\"", - sal.line, + gdb_printf ("Line %ps of \"%s\"", + styled_string (line_number_style.style (), + pulongest (sal.line)), symtab_to_filename_for_display (sal.symtab)); gdb_stdout->wrap_here (2); gdb_printf (" is at address "); @@ -2363,8 +2364,9 @@ tfind_line_command (const char *args, int from_tty) if (sal.line > 0 && find_line_pc_range (sal, &start_pc, &end_pc) && start_pc != end_pc) - gdb_printf ("Attempting to find line %d instead.\n", - sal.line); + gdb_printf ("Attempting to find line %ps instead.\n", + styled_string (line_number_style.style (), + pulongest (sal.line))); else error (_("Cannot find a good line.")); } @@ -2455,7 +2457,6 @@ tfind_outside_command (const char *args, int from_tty) static void info_scope_command (const char *args_in, int from_tty) { - struct bound_minimal_symbol msym; const struct block *block; const char *symname; const char *save_args = args_in; @@ -2579,17 +2580,20 @@ info_scope_command (const char *args_in, int from_tty) sym->value_block ()->entry_pc ())); break; case LOC_UNRESOLVED: - msym = lookup_minimal_symbol (sym->linkage_name (), - NULL, NULL); - if (msym.minsym == NULL) - gdb_printf ("Unresolved Static"); - else - { - gdb_printf ("static storage at address "); - gdb_printf ("%s", - paddress (gdbarch, msym.value_address ())); - } - break; + { + bound_minimal_symbol msym + = lookup_minimal_symbol (current_program_space, + sym->linkage_name ()); + if (msym.minsym == NULL) + gdb_printf ("Unresolved Static"); + else + { + gdb_printf ("static storage at address "); + gdb_printf ("%s", + paddress (gdbarch, msym.value_address ())); + } + break; + } case LOC_OPTIMIZED_OUT: gdb_printf ("optimized out.\n"); continue; @@ -2814,7 +2818,7 @@ encode_source_string (int tpnum, ULONGEST addr, if (80 + strlen (srctype) > buf_size) error (_("Buffer too small for source encoding")); sprintf (buf, "%x:%s:%s:%x:%x:", - tpnum, phex_nz (addr, sizeof (addr)), + tpnum, phex_nz (addr), srctype, 0, (int) strlen (src)); if (strlen (buf) + strlen (src) * 2 >= buf_size) error (_("Source string too long for buffer")); @@ -3642,7 +3646,7 @@ print_one_static_tracepoint_marker (int count, else uiout->field_skip ("fullname"); - uiout->field_signed ("line", sal.line); + uiout->field_signed ("line", sal.line, line_number_style.style ()); } else { @@ -3915,9 +3919,7 @@ static const struct internalvar_funcs sdata_funcs = cmd_list_element *while_stepping_cmd_element = nullptr; /* module initialization */ -void _initialize_tracepoint (); -void -_initialize_tracepoint () +INIT_GDB_FILE (tracepoint) { struct cmd_list_element *c; |