This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] infrun: step through indirect branch thunks


Hello Pedro,

> > --- a/gdb/gdbarch.sh
> > +++ b/gdb/gdbarch.sh
> > @@ -660,6 +660,9 @@ m;CORE_ADDR;skip_solib_resolver;CORE_ADDR
> > pc;pc;;generic_skip_solib_resolver;;0
> >  # Some systems also have trampoline code for returning from shared libs.
> >  m;int;in_solib_return_trampoline;CORE_ADDR pc, const char *name;pc,
> > name;;generic_in_solib_return_trampoline;;0
> >
> > +# Return true if PC lies inside an indirect branch thunk.
> > +m;bool;in_indirect_branch_thunk;CORE_ADDR
> > +pc;pc;;default_in_indirect_branch_thunk;;0
> 
> If that last 0 is the default (I never remember off hand), then please write "false"
> instead.  Assuming that works.

It is not the default.  I had to add a new function to return the default.  IIUC this
is disabling INVALID_P checks to allow default_in_indirect_branch_thunk to be
used as default.


> > +    gdb_test_multiple "stepi" "$test: stepi" {
> > +        -re "$current.*$gdb_prompt $" {
> > +            send_gdb "stepi\n"
> > +            exp_continue
> 
> This should probably have some upper bound.

Unless some compiler bug generated an infinite loop or GDB's stepping is
completely broken, we should eventually step out of $current.

I read your comment about an upper bound in your first reply but thought
that it wouldn't be necessary.  Do you think we need one?

Thanks,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]