This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

archer/tromey patches left to merge


Currently we still have some patches in the archer tromey/python
branch.  I want to finally close this branch, so I decided to write an
email about what is left, and try to decide what we should do about
those patches.  Here is what we have left:

* The -P, --python command line switch

  This feature changes interpretation of the command line so that the
  argument immediately following this switch is taken to be the name
  of a Python script file.  This option stops option processing;
  subsequent options are passed to Python as sys.argv.

* gdb.cli() command.

  This invokes a GDB command-line from a Python script.  Usage of this
  command (AFAIK) is exclusively with the -P switch. (You cannot run
  this command from the gdb command line -- it generates an error
  about recursive instantiatiations.)

  I understand why this exists (to invoke an interactive GDB
  command-line from a Python script), but I feel a little dubious
  about it.  Can we can construct a solid-use case for it?

* maint set python auto-load.

  Enable/disable the auto-loading of Python scripts when an object
  file is opened.

  I think this patch is dead.  It has been superseded by a the more
  generic and powerful gdb auto-load commands.

* require command.

  This command loads on demand a Python script that registers a gdb
  command and which has not been auto-loaded at start-up.  This makes
  it easier to load GDB commands written in Python.
  
* ignore_errors command.

  A wrapper which executes a single command, ignoring and suppressing
  all errors.

  I think this patch is dead.  Users can deal with these exceptions
  independently.

* pahole command.

  Show the holes in a structure.  Takes a type. Comment on those areas
  where it thinks it detects a hole.

  I think this command is generally useful.  I think I remember some
  comments about some problems with it.  I am hoping the discussion
  regarding the problems can be rewritten and posted here.

* caller_is convenience function.

  This function determines if the calling function's name is equal to
  a string that is passed to it.  It takes an optional argument to
  traverse n stack frames to find the function.

  I think this a useful convenience function.  It returns Boolean
  values, so is useful in GDB via the $ convenience variable
  functionality.  An additional option that would be useful would be
  the ability to tell the function to traverse the entire stack.

* caller_matches convenience function.

  Same as above, but use re.match for the comparison.  I think this
  functionality should be rolled into caller_is.

* in_scope convenience function.

  Return true if all the given variables and macros provided to it are
  in scope.  This function takes a variable amount of arguments, and
  will only Return true if all the arguments are in scope.  

There are a few other bits and pieces in there.  Most, as far as I can
determine, are just some orphaned bits of code.

So, lets decide what we want to port to upstream and what we can get
rid of.

Cheers,

Phil


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