Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-14 Thread Segher Boessenkool
On Thu, Nov 14, 2019 at 09:45:28AM +0300, Konstantin Kharlamov wrote: > On Ср, ноя 13, 2019 at 15:23, Jason Merrill > wrote: > >On Wed, Nov 13, 2019 at 6:39 AM Segher Boessenkool > > wrote: > >> There are users. There are users who have been used to this > >>behaviour > >> for many many many y

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-13 Thread Konstantin Kharlamov
On Ср, ноя 13, 2019 at 15:23, Jason Merrill wrote: On Wed, Nov 13, 2019 at 6:39 AM Segher Boessenkool wrote: On Tue, Nov 12, 2019 at 04:17:17PM +0300, Konstantin Kharlamov wrote: > On Вт, ноя 12, 2019 at 14:08, Andreas Schwab > wrote: > >On Nov 12 2019, Konstantin Kharlamov wrote: > >

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-13 Thread Jason Merrill
On Wed, Nov 13, 2019 at 6:39 AM Segher Boessenkool < seg...@kernel.crashing.org> wrote: > On Tue, Nov 12, 2019 at 04:17:17PM +0300, Konstantin Kharlamov wrote: > > On Вт, ноя 12, 2019 at 14:08, Andreas Schwab > > wrote: > > >On Nov 12 2019, Konstantin Kharlamov wrote: > > >> I'm definitely missin

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-13 Thread Segher Boessenkool
On Tue, Nov 12, 2019 at 04:17:17PM +0300, Konstantin Kharlamov wrote: > On Вт, ноя 12, 2019 at 14:08, Andreas Schwab > wrote: > >On Nov 12 2019, Konstantin Kharlamov wrote: > >> I'm definitely missing something. Who are these users, and how can > >>they > >> make anything useful of these functio

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Andreas Schwab
On Nov 12 2019, Konstantin Kharlamov wrote: > Besides, I suspect, the number of actual users of this gdbinit is around > zero, otherwise someone would have noticed the warning that gdb prints on > every usage of these functions while the PATCH 1/2 is not applied. It's easy to ignore it. Andreas.

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Konstantin Kharlamov
On Вт, ноя 12, 2019 at 14:08, Andreas Schwab wrote: On Nov 12 2019, Konstantin Kharlamov wrote: I'm definitely missing something. Who are these users, and how can they make anything useful of these functions if they don't even pass an argument? By printing the desired value. Hah, o

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Andreas Schwab
On Nov 12 2019, Konstantin Kharlamov wrote: > I'm definitely missing something. Who are these users, and how can they > make anything useful of these functions if they don't even pass an > argument? By printing the desired value. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fi

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Konstantin Kharlamov
On Вт, ноя 12, 2019 at 13:50, Andreas Schwab wrote: On Nov 12 2019, Konstantin Kharlamov wrote: Gdb documentation says that gdb-defined functions refer to their args as $arg0…$argN. The just "$" that gdbinit is using here refers to something else, That's the last thing printed. Hm

Re: [PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Andreas Schwab
On Nov 12 2019, Konstantin Kharlamov wrote: > Gdb documentation says that gdb-defined functions refer to their args as > $arg0…$argN. The just "$" that gdbinit is using here refers to something > else, That's the last thing printed. > which results in gdb errors, or even crashes of debuggee. Let

[PATCH 2/2] gdbinit.in: fix wrong reference to function argument

2019-11-12 Thread Konstantin Kharlamov
Gdb documentation says that gdb-defined functions refer to their args as $arg0…$argN. The just "$" that gdbinit is using here refers to something else, which results in gdb errors, or even crashes of debuggee. Let's fix that. * (debug,debug_rtx,pr,prl,pt,pct,pgg,pgq,pgq,pgs,pge,pmz,ptc, pdn,ptn,pd