From: Michael Snyder <msnyder@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] update "info scope" with new symtypes
Date: Fri, 07 May 2004 21:28:00 -0000 [thread overview]
Message-ID: <409BFF70.8020304@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 38 bytes --]
Add LOC_COMPUTED etc. to scope_info.
[-- Attachment #2: aaa --]
[-- Type: text/plain, Size: 4427 bytes --]
2004-05-07 Michael Snyder <msnyder@redhat.com>
* tracepoint.c (scope_info): Add handling for LOC_COMPUTED,
LOC_COMPUTED_ARG, and LOC_INDIRECT.
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.59
diff -p -r1.59 tracepoint.c
*** tracepoint.c 28 Apr 2004 16:36:25 -0000 1.59
--- tracepoint.c 7 May 2004 21:26:22 -0000
*************** scope_info (char *args, int from_tty)
*** 2345,2351 ****
sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
if (sals.nelts == 0)
! return; /* presumably decode_line_1 has already warned */
/* Resolve line numbers to PC */
resolve_sal_pc (&sals.sals[0]);
--- 2345,2351 ----
sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
if (sals.nelts == 0)
! return; /* presumably decode_line_1 has already warned */
/* Resolve line numbers to PC */
resolve_sal_pc (&sals.sals[0]);
*************** scope_info (char *args, int from_tty)
*** 2387,2393 ****
break;
case LOC_STATIC:
printf_filtered ("in static storage at address ");
! print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 1, gdb_stdout);
break;
case LOC_REGISTER:
printf_filtered ("a local variable in register $%s",
--- 2387,2394 ----
break;
case LOC_STATIC:
printf_filtered ("in static storage at address ");
! print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
! 1, gdb_stdout);
break;
case LOC_REGISTER:
printf_filtered ("a local variable in register $%s",
*************** scope_info (char *args, int from_tty)
*** 2419,2430 ****
continue;
case LOC_LABEL:
printf_filtered ("a label at address ");
! print_address_numeric (SYMBOL_VALUE_ADDRESS (sym), 1, gdb_stdout);
break;
case LOC_BLOCK:
printf_filtered ("a function at address ");
! print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)), 1,
! gdb_stdout);
break;
case LOC_BASEREG:
printf_filtered ("a variable at offset %ld from register $%s",
--- 2420,2432 ----
continue;
case LOC_LABEL:
printf_filtered ("a label at address ");
! print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
! 1, gdb_stdout);
break;
case LOC_BLOCK:
printf_filtered ("a function at address ");
! print_address_numeric (BLOCK_START (SYMBOL_BLOCK_VALUE (sym)),
! 1, gdb_stdout);
break;
case LOC_BASEREG:
printf_filtered ("a variable at offset %ld from register $%s",
*************** scope_info (char *args, int from_tty)
*** 2437,2443 ****
REGISTER_NAME (SYMBOL_BASEREG (sym)));
break;
case LOC_UNRESOLVED:
! msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym), NULL, NULL);
if (msym == NULL)
printf_filtered ("Unresolved Static");
else
--- 2439,2446 ----
REGISTER_NAME (SYMBOL_BASEREG (sym)));
break;
case LOC_UNRESOLVED:
! msym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (sym),
! NULL, NULL);
if (msym == NULL)
printf_filtered ("Unresolved Static");
else
*************** scope_info (char *args, int from_tty)
*** 2450,2459 ****
case LOC_OPTIMIZED_OUT:
printf_filtered ("optimized out.\n");
continue;
}
if (SYMBOL_TYPE (sym))
printf_filtered (", length %d.\n",
! TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym))));
}
if (BLOCK_FUNCTION (block))
break;
--- 2453,2474 ----
case LOC_OPTIMIZED_OUT:
printf_filtered ("optimized out.\n");
continue;
+ case LOC_HP_THREAD_LOCAL_STATIC:
+ printf_filtered ("HP thread local static ");
+ break;
+ case LOC_INDIRECT:
+ printf_filtered ("extern (local indirect) at address ");
+ print_address_numeric (SYMBOL_VALUE_ADDRESS (sym),
+ 1, gdb_stdout);
+ break;
+ case LOC_COMPUTED:
+ case LOC_COMPUTED_ARG:
+ SYMBOL_OPS (sym)->describe_location (sym, gdb_stdout);
+ break;
}
if (SYMBOL_TYPE (sym))
printf_filtered (", length %d.\n",
! TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym))));
}
if (BLOCK_FUNCTION (block))
break;
next reply other threads:[~2004-05-07 21:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 21:28 Michael Snyder [this message]
2004-05-07 22:55 ` Andrew Cagney
2004-05-08 3:50 ` Michael Snyder
2004-05-08 16:01 ` Andrew Cagney
2004-05-11 22:43 ` Michael Snyder
2004-05-11 22:55 ` Andrew Cagney
2004-05-12 0:20 ` Michael Snyder
2004-05-14 13:59 ` Andrew Cagney
2004-05-14 18:41 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=409BFF70.8020304@redhat.com \
--to=msnyder@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox