* Re: RFC (gdb/mi): -stack-list-locals [not found] <1069611654.20143.ezmlm@sources.redhat.com> @ 2003-12-01 19:27 ` Jim Ingham 0 siblings, 0 replies; 6+ messages in thread From: Jim Ingham @ 2003-12-01 19:27 UTC (permalink / raw) To: gdb-patches I think you want to call check_typedef here, or you will end up printing typedef'ed struct's... Jim On Nov 23, 2003, at 10:20 AM, gdb-patches-digest-help@sources.redhat.com wrote: > + if (TYPE_CODE (sym2->type) != TYPE_CODE_ARRAY && > + TYPE_CODE (sym2->type) != TYPE_CODE_STRUCT) > + { > + print_variable_value (sym2, fi, stb->stream); > + ui_out_field_stream (uiout, "value", stb); > + } > -- Jim Ingham jingham@apple.com Developer Tools Apple Computer ^ permalink raw reply [flat|nested] 6+ messages in thread
* RFC (gdb/mi): -stack-list-locals
@ 2003-11-23 0:16 Nick Roberts
2003-11-26 0:48 ` Andrew Cagney
0 siblings, 1 reply; 6+ messages in thread
From: Nick Roberts @ 2003-11-23 0:16 UTC (permalink / raw)
To: gdb-patches
Attached is a patch for -stack-list-locals which roughly modifies this command
as I described previously on gdb@sources.redhat.com (Thu, 6 Nov 2003 22:04:22
+0000). It actually does the following:
1) Display the name, type and value for simple data types.
2) Display the name and type for complex data types.
I don't really know what make_cleanup_ui_out_tuple_begin_end and do_cleanups
do and I've approximated a simple data type to something that isn't
TYPE_CODE_ARRAY or TYPE_CODE_STRUCT so it's probably a pretty gross hack.
The idea is that the user can see the value of simple data types immediately
and can create variable objects for complex data types if he wishes to explore
their values in more detail.
Any comments?
Nick http://www.nick.uklinux.net
*** mi-cmd-stack.c.~1.19.~ 2003-06-12 23:29:37.000000000 +0100
--- mi-cmd-stack.c 2003-11-22 23:49:24.000000000 +0000
***************
*** 273,292 ****
make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym));
! if (values)
! {
! struct symbol *sym2;
! if (!locals)
! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
! block, VAR_DOMAIN,
! (int *) NULL,
! 2 (struct symtab **) NULL);
! else
sym2 = sym;
print_variable_value (sym2, fi, stb->stream);
ui_out_field_stream (uiout, "value", stb);
- do_cleanups (cleanup_tuple);
}
}
}
if (BLOCK_FUNCTION (block))
--- 273,303 ----
make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym));
! struct symbol *sym2;
! if (!locals)
! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym),
! block, VAR_DOMAIN,
! (int *) NULL,
! (struct symtab **) NULL);
! else
sym2 = sym;
+ if (values == 2)
+ {
+ type_print (sym2->type, "", stb->stream, -1);
+ ui_out_field_stream (uiout, "type", stb);
+ if (TYPE_CODE (sym2->type) != TYPE_CODE_ARRAY &&
+ TYPE_CODE (sym2->type) != TYPE_CODE_STRUCT)
+ {
+ print_variable_value (sym2, fi, stb->stream);
+ ui_out_field_stream (uiout, "value", stb);
+ }
+ }
+ else if (values)
+ {
print_variable_value (sym2, fi, stb->stream);
ui_out_field_stream (uiout, "value", stb);
}
+ if (values) do_cleanups (cleanup_tuple);
}
}
if (BLOCK_FUNCTION (block))
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: RFC (gdb/mi): -stack-list-locals 2003-11-23 0:16 Nick Roberts @ 2003-11-26 0:48 ` Andrew Cagney 2003-12-02 3:14 ` RFC (gdb/mi): -stack-list-locals + PATCH Nick Roberts 0 siblings, 1 reply; 6+ messages in thread From: Andrew Cagney @ 2003-11-26 0:48 UTC (permalink / raw) To: Nick Roberts; +Cc: gdb-patches > Attached is a patch for -stack-list-locals which roughly modifies this command > as I described previously on gdb@sources.redhat.com (Thu, 6 Nov 2003 22:04:22 > +0000). It actually does the following: > > 1) Display the name, type and value for simple data types. > 2) Display the name and type for complex data types. > > I don't really know what make_cleanup_ui_out_tuple_begin_end and do_cleanups > do and I've approximated a simple data type to something that isn't > TYPE_CODE_ARRAY or TYPE_CODE_STRUCT so it's probably a pretty gross hack. > > The idea is that the user can see the value of simple data types immediately > and can create variable objects for complex data types if he wishes to explore > their values in more detail. > > Any comments? Looks like its time to cleanup "values" changing it to an enum or bitmask - too many magic numbers. Would is_integral_type() give you what you want? For the cleanups try the restructured form: { struct cleanup = cleanups = make_cleanup (NULL, null_cleanup); .. do_cleanups (cleanups); } http://sources.redhat.com/gdb/current/onlinedocs/gdbint_13.html#SEC112 make_cleanup_ui_out_tuple_begin_end opens the tuple and then closes it via a cleanup (if an error is thrown the tuple under construction is still finished). Andrew > Nick http://www.nick.uklinux.net > > > > *** mi-cmd-stack.c.~1.19.~ 2003-06-12 23:29:37.000000000 +0100 > --- mi-cmd-stack.c 2003-11-22 23:49:24.000000000 +0000 > *************** > *** 273,292 **** > make_cleanup_ui_out_tuple_begin_end (uiout, NULL); > ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym)); > > ! if (values) > ! { > ! struct symbol *sym2; > ! if (!locals) > ! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), > ! block, VAR_DOMAIN, > ! (int *) NULL, > ! 2 (struct symtab **) NULL); > ! else > sym2 = sym; > print_variable_value (sym2, fi, stb->stream); > ui_out_field_stream (uiout, "value", stb); > - do_cleanups (cleanup_tuple); > } > } > } > if (BLOCK_FUNCTION (block)) > --- 273,303 ---- > make_cleanup_ui_out_tuple_begin_end (uiout, NULL); > ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym)); > > ! struct symbol *sym2; > ! if (!locals) > ! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), > ! block, VAR_DOMAIN, > ! (int *) NULL, > ! (struct symtab **) NULL); > ! else > sym2 = sym; > + if (values == 2) > + { > + type_print (sym2->type, "", stb->stream, -1); > + ui_out_field_stream (uiout, "type", stb); > + if (TYPE_CODE (sym2->type) != TYPE_CODE_ARRAY && > + TYPE_CODE (sym2->type) != TYPE_CODE_STRUCT) > + { > + print_variable_value (sym2, fi, stb->stream); > + ui_out_field_stream (uiout, "value", stb); > + } > + } > + else if (values) > + { > print_variable_value (sym2, fi, stb->stream); > ui_out_field_stream (uiout, "value", stb); > } > + if (values) do_cleanups (cleanup_tuple); > } > } > if (BLOCK_FUNCTION (block)) > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC (gdb/mi): -stack-list-locals + PATCH 2003-11-26 0:48 ` Andrew Cagney @ 2003-12-02 3:14 ` Nick Roberts 2003-12-09 2:42 ` RFC (gdb/mi): -stack-list-locals + REVISED PATCH Nick Roberts 0 siblings, 1 reply; 6+ messages in thread From: Nick Roberts @ 2003-12-02 3:14 UTC (permalink / raw) To: Andrew Cagney; +Cc: gdb-patches ... > > I don't really know what make_cleanup_ui_out_tuple_begin_end and do_cleanups > > do and I've approximated a simple data type to something that isn't > > TYPE_CODE_ARRAY or TYPE_CODE_STRUCT so it's probably a pretty gross hack. > > > > The idea is that the user can see the value of simple data types immediately > > and can create variable objects for complex data types if he wishes to explore > > their values in more detail. > > > > Any comments? > > Looks like its time to cleanup "values" changing it to an enum or > bitmask - too many magic numbers. I see now that I've also inadvertantly defined "-stack-list-arguments 2". I don't know what magic numbers are but clearly better structure is desirable. > Would is_integral_type() give you what you want? For a simple data type? I don't think so. What about float? Perhaps I'm missing your point. > > For the cleanups try the restructured form: > { > struct cleanup = cleanups = make_cleanup (NULL, null_cleanup); > .. > do_cleanups (cleanups); > } > http://sources.redhat.com/gdb/current/onlinedocs/gdbint_13.html#SEC112 > > make_cleanup_ui_out_tuple_begin_end opens the tuple and then closes it > via a cleanup (if an error is thrown the tuple under construction is > still finished). I understand make_cleanup_ui_out_tuple_begin_end but not the above restructured form. Do I have to call make_cleanup (or relatives) each time I allocated memory i.e for each call to ui_out_field_stream? While I'm thinking about the above, here is a basic patch for mi-cmd-stack.c. Currently if -stack-list-locals is invoked then it gives a segmentation fault (Segmentation fault (core dumped)). This is inconvenient and the patch changes this to give an output similar to that of cli: &"No frame selected.\n" ^error,msg="No frame selected." (gdb) Nick http://www.nick.uklinux.net *** mi-cmd-stack.c.~1.19.~ 2003-06-12 23:29:37.000000000 +0100 --- mi-cmd-stack.c 2003-12-02 02:43:04.000000000 +0000 *************** *** 138,147 **** --- 138,150 ---- mi_cmd_stack_list_locals (char *command, char **argv, int argc) { if (argc != 1) error ("mi_cmd_stack_list_locals: Usage: PRINT_VALUES"); + if (!deprecated_selected_frame) + error ("No frame selected."); + list_args_or_locals (1, atoi (argv[0]), deprecated_selected_frame); return MI_CMD_DONE; } ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC (gdb/mi): -stack-list-locals + REVISED PATCH 2003-12-02 3:14 ` RFC (gdb/mi): -stack-list-locals + PATCH Nick Roberts @ 2003-12-09 2:42 ` Nick Roberts 2003-12-10 17:56 ` Andrew Cagney 0 siblings, 1 reply; 6+ messages in thread From: Nick Roberts @ 2003-12-09 2:42 UTC (permalink / raw) To: gdb-patches This patch: 1) Follows Jim Ingham's advice of using check_typedef to guard against the case of TYPE_CODE_TYPEDEF. 2) Avoids a segmentation fault if -stack-list-locals is invoked before the inferior has started execution. 3) Still introduces "-stack-list-locals 2". I'm not sure how to simplify this as any change must presumably be beackward compatible. I don't think using different numbers to mean different things is a problem here as mi commands are not intended for the user and so don't need to be remembered by him/her. Nick http://www.nick.uklinux.net *** mi-cmd-stack.c.~1.19.~ 2003-06-12 23:29:37.000000000 +0100 --- mi-cmd-stack.c 2003-12-09 02:12:45.000000000 +0000 *************** *** 140,145 **** --- 140,148 ---- if (argc != 1) error ("mi_cmd_stack_list_locals: Usage: PRINT_VALUES"); + if (!deprecated_selected_frame) + error ("No frame selected."); + list_args_or_locals (1, atoi (argv[0]), deprecated_selected_frame); return MI_CMD_DONE; } *************** *** 273,288 **** make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym)); ! if (values) ! { ! struct symbol *sym2; ! if (!locals) ! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), ! block, VAR_DOMAIN, ! (int *) NULL, ! (struct symtab **) NULL); ! else sym2 = sym; print_variable_value (sym2, fi, stb->stream); ui_out_field_stream (uiout, "value", stb); do_cleanups (cleanup_tuple); --- 276,304 ---- make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym)); ! struct symbol *sym2; ! if (!locals) ! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), ! block, VAR_DOMAIN, ! (int *) NULL, ! (struct symtab **) NULL); ! else sym2 = sym; + if (values == 2) + { + type_print (sym2->type, "", stb->stream, -1); + ui_out_field_stream (uiout, "type", stb); + if (TYPE_CODE (check_typedef (sym2->type)) != TYPE_CODE_ARRAY + && + TYPE_CODE (check_typedef (sym2->type)) != TYPE_CODE_STRUCT) + { + print_variable_value (sym2, fi, stb->stream); + ui_out_field_stream (uiout, "value", stb); + } + do_cleanups (cleanup_tuple); + } + else if (values) + { print_variable_value (sym2, fi, stb->stream); ui_out_field_stream (uiout, "value", stb); do_cleanups (cleanup_tuple); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC (gdb/mi): -stack-list-locals + REVISED PATCH 2003-12-09 2:42 ` RFC (gdb/mi): -stack-list-locals + REVISED PATCH Nick Roberts @ 2003-12-10 17:56 ` Andrew Cagney 2003-12-12 20:51 ` RFC (gdb/mi): -stack-list-locals Nick Roberts 0 siblings, 1 reply; 6+ messages in thread From: Andrew Cagney @ 2003-12-10 17:56 UTC (permalink / raw) To: Nick Roberts; +Cc: gdb-patches > This patch: > > 1) Follows Jim Ingham's advice of using check_typedef to guard against the > case of TYPE_CODE_TYPEDEF. > > 2) Avoids a segmentation fault if -stack-list-locals is invoked before the > inferior has started execution. > > 3) Still introduces "-stack-list-locals 2". I'm not sure how to simplify this > as any change must presumably be beackward compatible. I don't think using > different numbers to mean different things is a problem here as mi commands > are not intended for the user and so don't need to be remembered by > him/her. True, but they also need to be fairly self documenting. Anyway, see below: > Nick http://www.nick.uklinux.net > > > > *** mi-cmd-stack.c.~1.19.~ 2003-06-12 23:29:37.000000000 +0100 > --- mi-cmd-stack.c 2003-12-09 02:12:45.000000000 +0000 > *************** > *** 140,145 **** > --- 140,148 ---- > if (argc != 1) > error ("mi_cmd_stack_list_locals: Usage: PRINT_VALUES"); > > + if (!deprecated_selected_frame) > + error ("No frame selected."); struct frame_info *frame; ... frame = get_selected_frame (); is better. It throws an error if there is no frame, and follow on code can use "frame" instead of "deprecated_selected_frame" (and would be a really appreciated cleanup!). > list_args_or_locals (1, atoi (argv[0]), deprecated_selected_frame); I was thinking of something as simple as: enum print_values { PRINT_NO_VALUES, PRINT_ALL_VALUES, PRINT_SIMPLE_VALUES }; and then the very mechanical: enum print_values print_values; if (strcmp (argv[0], "0") == 0 || strcmp (argv[0], "no-values") == 0) print_values = PRINT_NO_VALUES; else if (strcmp (argv[0], "1") == 0 || strcmp (argv[0], "all-values") == 0) print_values = PRINT_ALL_VALUES; else if (strcmp (argv[0], "simple-values") == 0) print_values = PRINT_SIMPLE_VALUES; else error ("..."); list_args_or_locals (1, print_values, ...); (the names aren't the best so feel free to improve). > return MI_CMD_DONE; > } > *************** > *** 273,288 **** > make_cleanup_ui_out_tuple_begin_end (uiout, NULL); > ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym)); > > ! if (values) if (values != PRINT_NO_VALUES) > ! { > ! struct symbol *sym2; > ! if (!locals) > ! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), > ! block, VAR_DOMAIN, > ! (int *) NULL, > ! (struct symtab **) NULL); > ! else > sym2 = sym; > print_variable_value (sym2, fi, stb->stream); > ui_out_field_stream (uiout, "value", stb); > do_cleanups (cleanup_tuple); > --- 276,304 ---- > make_cleanup_ui_out_tuple_begin_end (uiout, NULL); > ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym)); > > ! struct symbol *sym2; > ! if (!locals) > ! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), Since you're here, I'd change this to SYMBOL_PRINT_NAME. The comment below, from symtab.h, hopefully explains the difference (I also hope I picked the correct winner): /* Now come lots of name accessor macros. Short version as to when to use which: Use SYMBOL_NATURAL_NAME to refer to the name of the symbol in the original source code. Use SYMBOL_LINKAGE_NAME if you want to know what the linker thinks the symbol's name is. Use SYMBOL_PRINT_NAME for output. Use SYMBOL_DEMANGLED_NAME if you specifically need to know whether SYMBOL_NATURAL_NAME and SYMBOL_LINKAGE_NAME are different. Don't use DEPRECATED_SYMBOL_NAME at all: instances of that macro should be replaced by SYMBOL_NATURAL_NAME, SYMBOL_LINKAGE_NAME, or perhaps SYMBOL_PRINT_NAME. */ > ! block, VAR_DOMAIN, > ! (int *) NULL, > ! (struct symtab **) NULL); > ! else > sym2 = sym; > + if (values == 2) if (values == PRINT_SIMPLE_VALUES) > + { > + type_print (sym2->type, "", stb->stream, -1); > + ui_out_field_stream (uiout, "type", stb); > + if (TYPE_CODE (check_typedef (sym2->type)) != TYPE_CODE_ARRAY > + && > + TYPE_CODE (check_typedef (sym2->type)) != TYPE_CODE_STRUCT) You may also want to consider TYPE_CODE_UNION? Your choice. > + { > + print_variable_value (sym2, fi, stb->stream); > + ui_out_field_stream (uiout, "value", stb); > + } > + do_cleanups (cleanup_tuple); > + } > + else if (values) if (values == PRINT_ALL_VALUES) > + { > print_variable_value (sym2, fi, stb->stream); > ui_out_field_stream (uiout, "value", stb); > do_cleanups (cleanup_tuple); > Anyway, it's basicly there. Just the doco update (which is eli's call) (and for the assignment to pop up), and testcase. For the testcase, just edit mi-stack.exp. You don't need to edit mi[12]-stack.exp as there's no expectation that this new feature will work with old MI versions. (since I'm traveling, I may be slow in responding, hopefully though, between my self and elena someone will be able to give a thumbs up and organize your account). Andrew ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC (gdb/mi): -stack-list-locals 2003-12-10 17:56 ` Andrew Cagney @ 2003-12-12 20:51 ` Nick Roberts 2003-12-12 21:09 ` David Carlton 2003-12-12 23:01 ` Jason Molenda 0 siblings, 2 replies; 6+ messages in thread From: Nick Roberts @ 2003-12-12 20:51 UTC (permalink / raw) To: Andrew Cagney, jmolenda; +Cc: gdb-patches These (two) patches uses 1) get_selected_frame instead of deprecated_selected_frame. 2) SYMBOL_PRINT_NAME instead of DEPRECATED_SYMBOL_NAME. 3) enum for print_values. Jason Molenda writes: > ...Right now we have a > non-standard meaning for -stack-list-locals 2, and the FSF gdb will > have a different meaning for 2 with this patch going in. No complaints > or anything, but it's unpleasant. I don't see why both our changes can't be accommodated. This patch uses a switch statement for each value of print_values. If for some reason Apple need -stack-list-locals 2, I dont mind using another value. Everybody seems to want Apple's changes, including their management. Rather than being unpleasant, perhaps this is an opportunity to make the case to that management for resources to contribute back to the FSF. Nick http://www.nick.uklinux.net *** mi-cmd-stack.c.~1.19.~ 2003-06-12 23:29:37.000000000 +0100 --- mi-cmd-stack.c 2003-12-11 00:53:34.000000000 +0000 *************** *** 29,34 **** --- 29,35 ---- #include "block.h" #include "stack.h" #include "dictionary.h" + #include "gdb_string.h" static void list_args_or_locals (int locals, int values, struct frame_info *fi); *************** *** 137,146 **** enum mi_cmd_result mi_cmd_stack_list_locals (char *command, char **argv, int argc) { if (argc != 1) error ("mi_cmd_stack_list_locals: Usage: PRINT_VALUES"); ! list_args_or_locals (1, atoi (argv[0]), deprecated_selected_frame); return MI_CMD_DONE; } --- 138,159 ---- enum mi_cmd_result mi_cmd_stack_list_locals (char *command, char **argv, int argc) { + struct frame_info *frame; + enum print_values print_values; + if (argc != 1) error ("mi_cmd_stack_list_locals: Usage: PRINT_VALUES"); ! frame = get_selected_frame (); ! ! if (strcmp (argv[0], "1") == 0 || strcmp (argv[0], "all-values") == 0) ! print_values = PRINT_ALL_VALUES; ! else if (strcmp (argv[0], "2") == 0 || strcmp (argv[0], "simple-values") == 0) ! print_values = PRINT_SIMPLE_VALUES; ! else ! print_values = PRINT_NO_VALUES; ! ! list_args_or_locals (1, print_values, frame); return MI_CMD_DONE; } *************** *** 218,223 **** --- 231,237 ---- int nsyms; struct cleanup *cleanup_list; static struct ui_stream *stb = NULL; + struct type *type; stb = ui_out_stream_new (uiout); *************** *** 268,291 **** if (print_me) { struct cleanup *cleanup_tuple = NULL; ! if (values) cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ! ui_out_field_string (uiout, "name", DEPRECATED_SYMBOL_NAME (sym)); ! if (values) ! { ! struct symbol *sym2; ! if (!locals) ! sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), ! block, VAR_DOMAIN, ! (int *) NULL, ! (struct symtab **) NULL); ! else sym2 = sym; print_variable_value (sym2, fi, stb->stream); ui_out_field_stream (uiout, "value", stb); do_cleanups (cleanup_tuple); } } } --- 282,320 ---- if (print_me) { struct cleanup *cleanup_tuple = NULL; ! if (values != PRINT_NO_VALUES) cleanup_tuple = make_cleanup_ui_out_tuple_begin_end (uiout, NULL); ! ui_out_field_string (uiout, "name", SYMBOL_PRINT_NAME (sym)); ! struct symbol *sym2; ! if (!locals) ! sym2 = lookup_symbol (SYMBOL_PRINT_NAME (sym), ! block, VAR_DOMAIN, ! (int *) NULL, ! (struct symtab **) NULL); ! else sym2 = sym; + switch (values) + { + case PRINT_SIMPLE_VALUES: + type = check_typedef (sym2->type); + type_print (sym2->type, "", stb->stream, -1); + ui_out_field_stream (uiout, "type", stb); + if (TYPE_CODE (type) != TYPE_CODE_ARRAY && + TYPE_CODE (type) != TYPE_CODE_STRUCT && + TYPE_CODE (type) != TYPE_CODE_UNION) + { + print_variable_value (sym2, fi, stb->stream); + ui_out_field_stream (uiout, "value", stb); + } + do_cleanups (cleanup_tuple); + break; + case PRINT_ALL_VALUES: print_variable_value (sym2, fi, stb->stream); ui_out_field_stream (uiout, "value", stb); do_cleanups (cleanup_tuple); + break; } } } *** mi-cmds.h.~1.10.~ 2003-10-24 22:30:52.000000000 +0100 --- mi-cmds.h 2003-12-10 20:09:22.000000000 +0000 *************** *** 48,53 **** --- 48,59 ---- MI_CMD_QUIET }; + enum print_values { + PRINT_NO_VALUES, + PRINT_ALL_VALUES, + PRINT_SIMPLE_VALUES + }; + typedef enum mi_cmd_result (mi_cmd_argv_ftype) (char *command, char **argv, int argc); /* Older MI commands have this interface. Retained until all old ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC (gdb/mi): -stack-list-locals 2003-12-12 20:51 ` RFC (gdb/mi): -stack-list-locals Nick Roberts @ 2003-12-12 21:09 ` David Carlton 2003-12-12 23:01 ` Jason Molenda 1 sibling, 0 replies; 6+ messages in thread From: David Carlton @ 2003-12-12 21:09 UTC (permalink / raw) To: Nick Roberts; +Cc: Andrew Cagney, jmolenda, gdb-patches On Fri, 12 Dec 2003 20:43:16 +0000, Nick Roberts <nick@nick.uklinux.net> said: > 2) SYMBOL_PRINT_NAME instead of DEPRECATED_SYMBOL_NAME. It should be SYMBOL_NATURAL_NAME. At least for the call to lookup_symbol; maybe SYMBOL_PRINT_NAME is correct for the ui_out_field_string call. David Carlton carlton@kealia.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RFC (gdb/mi): -stack-list-locals 2003-12-12 20:51 ` RFC (gdb/mi): -stack-list-locals Nick Roberts 2003-12-12 21:09 ` David Carlton @ 2003-12-12 23:01 ` Jason Molenda 1 sibling, 0 replies; 6+ messages in thread From: Jason Molenda @ 2003-12-12 23:01 UTC (permalink / raw) To: Nick Roberts; +Cc: gdb-patches On Dec 12, 2003, at 12:43 PM, Nick Roberts wrote: > Jason Molenda writes: > >> ...Right now we have a >> non-standard meaning for -stack-list-locals 2, and the FSF gdb will >> have a different meaning for 2 with this patch going in. No >> complaints >> or anything, but it's unpleasant. > > I don't see why both our changes can't be accommodated. Well, if we're both implementing a different meaning for "2" that's a pretty tough thing to accommodate. :-) I didn't mean my statement as a criticism of this change or the work you're doing -- this is the sort of thing we inevitably have come up when we have lots of changes vs. the mainline. We made our bed, etc. > This patch uses a > switch statement for each value of print_values. If for some reason > Apple need > -stack-list-locals 2, I dont mind using another value. "3" would be very nice. :) But really, I think Andrew's suggestion is a better approach. Instead of numeric values which represent an arbitrary collection of return values ("2" is "the things Apple's UI would like to get", "3" is "a smaller set of things that don't involve so much communication with the inferior"), text strings are a little less likely to conflict. > Everybody seems to > want Apple's changes, including their management. Rather than being > unpleasant, perhaps this is an opportunity to make the case to that > management > for resources to contribute back to the FSF. Yeah, it's the usual problem. Lots to do, not so much time in which to do it, sigh. J ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-12-12 23:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1069611654.20143.ezmlm@sources.redhat.com>
2003-12-01 19:27 ` RFC (gdb/mi): -stack-list-locals Jim Ingham
2003-11-23 0:16 Nick Roberts
2003-11-26 0:48 ` Andrew Cagney
2003-12-02 3:14 ` RFC (gdb/mi): -stack-list-locals + PATCH Nick Roberts
2003-12-09 2:42 ` RFC (gdb/mi): -stack-list-locals + REVISED PATCH Nick Roberts
2003-12-10 17:56 ` Andrew Cagney
2003-12-12 20:51 ` RFC (gdb/mi): -stack-list-locals Nick Roberts
2003-12-12 21:09 ` David Carlton
2003-12-12 23:01 ` Jason Molenda
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox