* [PATCH] update "info scope" with new symtypes
@ 2004-05-07 21:28 Michael Snyder
2004-05-07 22:55 ` Andrew Cagney
0 siblings, 1 reply; 9+ messages in thread
From: Michael Snyder @ 2004-05-07 21:28 UTC (permalink / raw)
To: gdb-patches
[-- 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;
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] update "info scope" with new symtypes
2004-05-07 21:28 [PATCH] update "info scope" with new symtypes Michael Snyder
@ 2004-05-07 22:55 ` Andrew Cagney
2004-05-08 3:50 ` Michael Snyder
2004-05-14 13:59 ` Andrew Cagney
0 siblings, 2 replies; 9+ messages in thread
From: Andrew Cagney @ 2004-05-07 22:55 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
> Add LOC_COMPUTED etc. to scope_info.
Michael, most of this patch is white space changes and as such should
separated out and committed separatly.
Andrew
> 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;
> }
> if (SYMBOL_TYPE (sym))
> printf_filtered (", length %d.\n",
> ! TYPE_LENGTH (check_typedef (SYMBOL_TYPE (sym))));
> }
> if (BLOCK_FUNCTION (block))
> break;
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] update "info scope" with new symtypes
2004-05-07 22:55 ` Andrew Cagney
@ 2004-05-08 3:50 ` Michael Snyder
2004-05-08 16:01 ` Andrew Cagney
2004-05-14 13:59 ` Andrew Cagney
1 sibling, 1 reply; 9+ messages in thread
From: Michael Snyder @ 2004-05-08 3:50 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
Andrew Cagney wrote:
>> Add LOC_COMPUTED etc. to scope_info.
>
>
> Michael, most of this patch is white space changes and as such should
> separated out and committed separatly.
Andrew, I could understand your objection if this were a
request for review, but since it's a patch that I'm checking
in directly, I don't understand what your point is. You want
every whitespace change to have its own separate entry in the
revision history? Or... ?
I don't anticipate anyone having to go back and figure out
my whitespace changes in retrospect, especially since I'm
pretty much the only one who ever actively works on the file.
Seems like a moot point that I'm not actually listed as its
maintainer...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] update "info scope" with new symtypes
2004-05-08 3:50 ` Michael Snyder
@ 2004-05-08 16:01 ` Andrew Cagney
2004-05-11 22:43 ` Michael Snyder
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2004-05-08 16:01 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
Andrew Cagney wrote:
Add LOC_COMPUTED etc. to scope_info.
Michael, most of this patch is white space changes and as such should separated out and committed separatly.
Andrew, I could understand your objection if this were a
request for review, but since it's a patch that I'm checking
in directly,
Sorry, I don't understand. We're expected to apply standards uniformly
(here minimizing white space) be it peer review or self-review.
Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] update "info scope" with new symtypes
2004-05-08 16:01 ` Andrew Cagney
@ 2004-05-11 22:43 ` Michael Snyder
2004-05-11 22:55 ` Andrew Cagney
0 siblings, 1 reply; 9+ messages in thread
From: Michael Snyder @ 2004-05-11 22:43 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
Andrew Cagney wrote:
Andrew Cagney wrote:
Add LOC_COMPUTED etc. to scope_info.
Michael, most of this patch is white space changes and as such should
separated out and committed separatly.
Andrew, I could understand your objection if this were a
request for review, but since it's a patch that I'm checking
in directly,
Sorry, I don't understand. We're expected to apply standards uniformly
(here minimizing white space) be it peer review or self-review.
We're even -- I don't understand either. Minimizing white space?
Anyway, this discussion occurred in 2000 -- I've reviewed it,
and it was entirely concerned with the difficulty of *reviewing*
patches that included mixed code and whitespace changes.
Since then, mixed changes that don't have to be reviewed have
frequently been posted without attracting comment.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] update "info scope" with new symtypes
2004-05-11 22:43 ` Michael Snyder
@ 2004-05-11 22:55 ` Andrew Cagney
2004-05-12 0:20 ` Michael Snyder
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2004-05-11 22:55 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
Anyway, this discussion occurred in 2000 -- I've reviewed it,
and it was entirely concerned with the difficulty of *reviewing*
patches that included mixed code and whitespace changes.
Right, and _every_ patch, gets reviewed. It's just that some get
self-reviewed rather than peer-reviwed. Either way, the contributor is
expected to meet the same standards.
What we definitly do not do is apply lower standards to self-reviewed
patches.
Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] update "info scope" with new symtypes
2004-05-07 22:55 ` Andrew Cagney
2004-05-08 3:50 ` Michael Snyder
@ 2004-05-14 13:59 ` Andrew Cagney
2004-05-14 18:41 ` Michael Snyder
1 sibling, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2004-05-14 13:59 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches
Add LOC_COMPUTED etc. to scope_info.
Michael, most of this patch is white space changes and as such should separated out and committed separatly.
Michael, I appologise for my very poor choice of words.
We've previously all agreed that it is helpful to commit whitespace
changes separately; it's easier to sort things out when looking at CVS
diffs later on. Could you do that?
Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] update "info scope" with new symtypes
2004-05-14 13:59 ` Andrew Cagney
@ 2004-05-14 18:41 ` Michael Snyder
0 siblings, 0 replies; 9+ messages in thread
From: Michael Snyder @ 2004-05-14 18:41 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
Andrew Cagney wrote:
Add LOC_COMPUTED etc. to scope_info.
Michael, most of this patch is white space changes and as such should
separated out and committed separatly.
Michael, I appologise for my very poor choice of words.
We've previously all agreed that it is helpful to commit whitespace
changes separately; it's easier to sort things out when looking at CVS
diffs later on. Could you do that?
Andrew, I don't agree that we have all agreed to what you say.
What I recall discussing (and my review of the mail archive
bears out my recollection) is that it is helpful if submissions
for review have whitespace changes separated out, becuase
otherwise they are difficult to review.
I also did not find any examples where you previously asked a
global maintainer to redo a mixed patch to a file that he or she
maintained. I did, OTOH, find at least seven examples where a
maintainer had committed such a patch, and nobody said anything
about it. I posted links to those patches.
I think you are proposing a new standard. I'm not committed
to opposing that standard, but it is new, and I think warrants
discussion by the group. If the group agrees to that standard,
I will be happy to abide by it. But standards should be set
by the group, not by one person.
Wouldn't you agree?
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-05-14 18:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-07 21:28 [PATCH] update "info scope" with new symtypes Michael Snyder
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox