This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[mi] -stack-list-arguments --simple-values

 > This patch makes -stack-list-arguments --simple-values work.
 > It looks like --simple-values (and friends) were accepted for
 > -stack-list-locals, but not for -stack-list-arguments. While
 > the utility of such human friendly spelling is unclear, for
 > a machine interface, it's even more confusing having 1/2
 > of relevant commands accept it.

It's not immediately clear from the manual that SHOW-VALUES from
-stack-list-arguments and PRINT-VALUES from -stack-list-locals are related.
-stack-list-arguments takes three arguments while -stack-list-locals only
takes -one.  I think it would be nice to have one command,
-stack-list-locals-and-args say, that lists both the locals and the arguments
of the current frame:

  The `-stack-list-locals-and-args' Command


  -stack-list-locals-and-args PRINT-VALUES

     Display the local variable and argument names for the selected frame.
  If PRINT-VALUES is 0 or `--no-values', print only the names of the
  variables; if it is 1 or `--all-values', print also their values; and
  if it is 2 or `--simple-values', print the name, type and value for
  simple data types and the name and type for arrays, structures and
  unions.  In this last case, a frontend can immediately display the
  value of simple data types and create variable objects for other data
  types when the user wishes to explore their values in more detail.

GDB Command

`info locals' and `info locals' in GDB.


     -stack-list-locals-and-args 0
     -stack-list-locals-and-args --all-values
       {name="C",value="{1, 2, 3}"}},args={{name="arg1",value="5"},

using curly brackets which appears to be more in keeping with the
JSON concept of an object.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]