From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4046 invoked by alias); 14 Oct 2013 11:26:38 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 3985 invoked by uid 89); 14 Oct 2013 11:26:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SARE_TOWRITE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <525BD4EA.60907@redhat.com> Date: Mon, 14 Oct 2013 11:26:00 -0000 From: Phil Muldoon MIME-Version: 1.0 To: archer@sourceware.org Subject: archer/tromey patches left to merge Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-q4/txt/msg00001.txt.bz2 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