public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: pmuldoon@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-pmuldoon-python-backtrace: Only print scalar values in frame arguments.
Date: Mon, 26 Mar 2012 15:32:00 -0000	[thread overview]
Message-ID: <20120326153244.14346.qmail@sourceware.org> (raw)

The branch, archer-pmuldoon-python-backtrace has been updated
       via  91c892b685cdcea5a1a23f358b322517b22ebc51 (commit)
      from  b755687278b49a949add8bb903f0dc4f53e35d1b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 91c892b685cdcea5a1a23f358b322517b22ebc51
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Mon Mar 26 16:32:17 2012 +0100

    Only print scalar values in frame arguments.

-----------------------------------------------------------------------

Summary of changes:
 gdb/python/py-framefilter.c                |    8 ++++++--
 gdb/python/python.h                        |    1 +
 gdb/stack.c                                |    1 +
 gdb/testsuite/gdb.python/py-framefilter.py |    4 ++--
 4 files changed, 10 insertions(+), 4 deletions(-)

First 500 lines of diff:
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index b290280..9a96bae 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -250,6 +250,7 @@ print_frame (PyObject *filter,
 	     int print_level,
 	     enum print_what print_what,
 	     int print_args,
+	     const char *print_args_type,
 	     struct ui_out *out,
 	     struct value_print_options opts,
 	     struct frame_info *frame)
@@ -487,7 +488,7 @@ print_frame (PyObject *filter,
 			opts.deref_ref = 1;
 
 			/* True in "summary" mode, false otherwise.  */
-			//  opts.summary = !strcmp (print_frame_arguments, "scalars");
+			 opts.summary = !strcmp (print_args_type, "scalars");
 			common_val_print (val, stb->stream, 2, &opts, language);
 			ui_out_field_stream (out, "value", stb);
 			if (size != 1 && list_index < size-1)
@@ -611,6 +612,7 @@ print_frame (PyObject *filter,
 int
 apply_frame_filter (struct frame_info *frame, int print_level,
 		    enum print_what print_what, int print_args,
+		    const char *print_args_type, 
 		    struct ui_out *out)
 {
   struct gdbarch *gdbarch = get_frame_arch (frame);
@@ -637,7 +639,9 @@ apply_frame_filter (struct frame_info *frame, int print_level,
 
   get_user_print_options (&opts);
   success =  print_frame (filter, print_level, print_what,
-			  print_args, out, opts, frame);
+			  print_args, print_args_type, out, opts,
+			  frame);
+
   
   /* 'print_frame' can return a frame to "resume" from, in the case
      that frames have been elided.  If the return value is NULL, also
diff --git a/gdb/python/python.h b/gdb/python/python.h
index 32a5653..80f7168 100644
--- a/gdb/python/python.h
+++ b/gdb/python/python.h
@@ -43,6 +43,7 @@ int apply_frame_filter (struct frame_info *frame,
 			int print_level,
 			enum print_what print_what,
 			int print_args,
+			const char *print_frame_arguments,
 			struct ui_out *out);
 
 void preserve_python_values (struct objfile *objfile, htab_t copied_types);
diff --git a/gdb/stack.c b/gdb/stack.c
index 9ae4290..75d4515 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -769,6 +769,7 @@ print_frame_info (struct frame_info *frame, int print_level,
   if (! frame_print_elide (frame))
     {
       int result = apply_frame_filter (frame, 1, LOCATION, 1,
+				       print_frame_arguments, 
 				       current_uiout);
       if (result)
 	return;
diff --git a/gdb/testsuite/gdb.python/py-framefilter.py b/gdb/testsuite/gdb.python/py-framefilter.py
index 0e9d40e..dc7d9be 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.py
+++ b/gdb/testsuite/gdb.python/py-framefilter.py
@@ -77,8 +77,8 @@ class Main_filter:
 
             if len (sym.linkage_name):
                 nsym, is_field_of_this = gdb.lookup_symbol (sym.linkage_name, block)
-            if nsym.addr_class != gdb.SYMBOL_LOC_REGISTER:
-                sym = nsym
+                if nsym.addr_class != gdb.SYMBOL_LOC_REGISTER:
+                    sym = nsym
             try:
                 val = sym.value(self.frame)
                 if val != None:


hooks/post-receive
--
Repository for Project Archer.


                 reply	other threads:[~2012-03-26 15:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120326153244.14346.qmail@sourceware.org \
    --to=pmuldoon@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).