public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gdbinit: add a new command and fix one
@ 2019-05-29  9:54 Martin Liška
  2019-05-29 16:20 ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2019-05-29  9:54 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

Hi.

The patch is about a small change in .gdbinit file.

Ready for trunk?
Martin

gcc/ChangeLog:

2019-05-29  Martin Liska  <mliska@suse.cz>

	* gdbinit.in: Fix 'ptc' command.  Add tt
	that prints TREE_TYPE($).
---
 gcc/gdbinit.in | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)



[-- Attachment #2: 0001-gdbinit-add-a-new-command-and-fix-one.patch --]
[-- Type: text/x-patch, Size: 533 bytes --]

diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index e16c3c8ef87..81c65d2e7b4 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -113,7 +113,7 @@ Works only when an inferior is executing.
 end
 
 define ptc
-output (enum tree_code) $.common.code
+output (enum tree_code) $.base.code
 echo \n
 end
 
@@ -201,6 +201,14 @@ document pcfun
 Print current function.
 end
 
+define tt
+print ($.typed.type)
+end
+
+document tt
+Print TREE_TYPE of the tree node that is $
+end
+
 define break-on-diagnostic
 break diagnostic_show_locus
 end


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdbinit: add a new command and fix one
  2019-05-29  9:54 [PATCH] gdbinit: add a new command and fix one Martin Liška
@ 2019-05-29 16:20 ` Jeff Law
  2019-05-29 18:27   ` Segher Boessenkool
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2019-05-29 16:20 UTC (permalink / raw)
  To: Martin Liška, gcc-patches

On 5/29/19 3:46 AM, Martin Liška wrote:
> Hi.
> 
> The patch is about a small change in .gdbinit file.
> 
> Ready for trunk?
> Martin
> 
> gcc/ChangeLog:
> 
> 2019-05-29  Martin Liska  <mliska@suse.cz>
> 
> 	* gdbinit.in: Fix 'ptc' command.  Add tt
> 	that prints TREE_TYPE($).
> ---
>  gcc/gdbinit.in | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> 
OK
jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdbinit: add a new command and fix one
  2019-05-29 16:20 ` Jeff Law
@ 2019-05-29 18:27   ` Segher Boessenkool
  2019-05-30  8:06     ` Martin Liška
  0 siblings, 1 reply; 4+ messages in thread
From: Segher Boessenkool @ 2019-05-29 18:27 UTC (permalink / raw)
  To: Jeff Law; +Cc: Martin Liška, gcc-patches

On Wed, May 29, 2019 at 10:14:58AM -0600, Jeff Law wrote:
> On 5/29/19 3:46 AM, Martin Liška wrote:
> > Hi.
> > 
> > The patch is about a small change in .gdbinit file.
> > 
> > Ready for trunk?
> > Martin
> > 
> > gcc/ChangeLog:
> > 
> > 2019-05-29  Martin Liska  <mliska@suse.cz>
> > 
> > 	* gdbinit.in: Fix 'ptc' command.  Add tt
> > 	that prints TREE_TYPE($).
> > ---
> >  gcc/gdbinit.in | 10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)

There already *is* a "tt" command.  Not that that one is likely very
useful for debugging GCC, but still...  Please check before overriding
commands.


Segher

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gdbinit: add a new command and fix one
  2019-05-29 18:27   ` Segher Boessenkool
@ 2019-05-30  8:06     ` Martin Liška
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liška @ 2019-05-30  8:06 UTC (permalink / raw)
  To: Segher Boessenkool, Jeff Law; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

On 5/29/19 8:18 PM, Segher Boessenkool wrote:
> On Wed, May 29, 2019 at 10:14:58AM -0600, Jeff Law wrote:
>> On 5/29/19 3:46 AM, Martin Liška wrote:
>>> Hi.
>>>
>>> The patch is about a small change in .gdbinit file.
>>>
>>> Ready for trunk?
>>> Martin
>>>
>>> gcc/ChangeLog:
>>>
>>> 2019-05-29  Martin Liska  <mliska@suse.cz>
>>>
>>> 	* gdbinit.in: Fix 'ptc' command.  Add tt
>>> 	that prints TREE_TYPE($).
>>> ---
>>>  gcc/gdbinit.in | 10 +++++++++-
>>>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> There already *is* a "tt" command. 

Oops. I'm renaming that to trt and I'm going to install that.

Martin

> Not that that one is likely very
> useful for debugging GCC, but still...  Please check before overriding
> commands.
> 
> 
> Segher
> 


[-- Attachment #2: 0001-gdbinit-add-a-new-command-and-fix-one.patch --]
[-- Type: text/x-patch, Size: 963 bytes --]

From 5e49f23ecedcc5278f14278a6bccd6d003b5cc60 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 29 May 2019 11:45:07 +0200
Subject: [PATCH] gdbinit: add a new command and fix one

gcc/ChangeLog:

2019-05-29  Martin Liska  <mliska@suse.cz>

	* gdbinit.in: Fix 'ptc' command.  Add trt
	that prints TREE_TYPE($).
---
 gcc/gdbinit.in | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index e16c3c8ef87..440fd2586f1 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -113,7 +113,7 @@ Works only when an inferior is executing.
 end
 
 define ptc
-output (enum tree_code) $.common.code
+output (enum tree_code) $.base.code
 echo \n
 end
 
@@ -201,6 +201,14 @@ document pcfun
 Print current function.
 end
 
+define trt
+print ($.typed.type)
+end
+
+document trt
+Print TREE_TYPE of the tree node that is $
+end
+
 define break-on-diagnostic
 break diagnostic_show_locus
 end
-- 
2.21.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-30  7:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29  9:54 [PATCH] gdbinit: add a new command and fix one Martin Liška
2019-05-29 16:20 ` Jeff Law
2019-05-29 18:27   ` Segher Boessenkool
2019-05-30  8:06     ` Martin Liška

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).