Message ID | 20150310103834.GK26802@redhat.com |
---|---|
State | New |
Headers | show |
On Tue, Mar 10, 2015 at 11:38 AM, Marek Polacek <polacek@redhat.com> wrote: > On Tue, Mar 10, 2015 at 11:33:13AM +0100, Richard Biener wrote: >> Isn't cfun->decl much more likely to work? > > Dunno, if that's the case, then: Ok (or use cfun ? cfun->decl : current_function_decl). Thanks, Richard. > 2015-03-10 Marek Polacek <polacek@redhat.com> > > * gdbinit.in (pcfun): Define and document. > > diff --git gcc/gdbinit.in gcc/gdbinit.in > index 10fe5ad..436de06 100644 > --- gcc/gdbinit.in > +++ gcc/gdbinit.in > @@ -199,6 +199,15 @@ document pel > Print expanded location of $. > end > > +define pcfun > +output debug_function (cfun->decl, 0) > +echo \n > +end > + > +document pcfun > +Print current function. > +end > + > # Define some macros helpful to gdb when it is expanding macros. > macro define __FILE__ "gdb" > macro define __LINE__ 1 > > Marek
diff --git gcc/gdbinit.in gcc/gdbinit.in index 10fe5ad..436de06 100644 --- gcc/gdbinit.in +++ gcc/gdbinit.in @@ -199,6 +199,15 @@ document pel Print expanded location of $. end +define pcfun +output debug_function (cfun->decl, 0) +echo \n +end + +document pcfun +Print current function. +end + # Define some macros helpful to gdb when it is expanding macros. macro define __FILE__ "gdb" macro define __LINE__ 1
On Tue, Mar 10, 2015 at 11:33:13AM +0100, Richard Biener wrote: > Isn't cfun->decl much more likely to work? Dunno, if that's the case, then: 2015-03-10 Marek Polacek <polacek@redhat.com> * gdbinit.in (pcfun): Define and document. Marek