Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: gdb-patches@sourceware.org, Maxim Grigoriev <maxim2405@gmail.com>,
	Woody LaRue <larue@cadence.com>, Marc Gauthier <marc@cadence.com>
Subject: [RFC] Re: [PATCH v2] xtensa: initialize call_abi in xtensa_tdep
Date: Thu, 20 Aug 2015 13:14:00 -0000	[thread overview]
Message-ID: <20150820131441.GG4571@adacore.com> (raw)
In-Reply-To: <20150820130736.GF4571@adacore.com>

> I think you missed or ignored one comment about the fact that
> the code I am seeing in current xtensa-tdep.h is not what your patch
> says. So it seems to me you are sending a patch that doesn't seem
> to be applying to master.
> 
> I would also be beneficial to explore what I was trying to explain
> regarding the fact that determining the proper ABI should be done
> on the fly, rather than hardcoded. This is particularly true with
> the fact that changing the hardcoded values involves adapting
> the contents of a file, which is not user-friendly, and nearly
> impossible for anyone but a knowledgeable GDB contributor.

You answered in the other email:
| I agree with that, but currently we can't distinguish executables with
| different call ABI.

Odd; that means that the linker would not reject the link of
objects that use different calling conventions? Wow, better be
careful!

In any case, I think what should really be done, if it has to be
hard-set in the debugger, is use a configure command-line option.
Or use a GDB setting "set xtensa call-abi [...]".

In the meantime, I have no strong objection to this code going in
on the grounds that it doesn't really make things all that worse.
But given that this is going against what I would recommend, give it
another week so that other Maintainers have a chance to comment
as well if they disagree with letting this in.

> > ---
> > Changes v1 -> v2:
> > - fix call_abi code formatting.
> > 
> >  gdb/xtensa-tdep.h | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h
> > index adacaf8..ff090f3 100644
> > --- a/gdb/xtensa-tdep.h
> > +++ b/gdb/xtensa-tdep.h
> > @@ -246,7 +246,9 @@ struct gdbarch_tdep
> >  	  .spill_location = -1,					\
> >  	  .spill_size = (spillsz),				\
> >  	  .unused = 0,						\
> > -	  .call_abi = 0,					\
> > +	  .call_abi = (XSHAL_ABI == XTHAL_ABI_CALL0		\
> > +		       ? CallAbiCall0Only			\
> > +		       : CallAbiDefault),			\
> >  	  .debug_interrupt_level = XCHAL_DEBUGLEVEL,		\
> >  	  .icache_line_bytes = XCHAL_ICACHE_LINESIZE,		\
> >  	  .dcache_line_bytes = XCHAL_DCACHE_LINESIZE,		\
> > -- 
> > 1.8.1.4
> 
> -- 
> Joel

-- 
Joel


  reply	other threads:[~2015-08-20 13:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 12:53 Max Filippov
2015-08-20 13:07 ` Joel Brobecker
2015-08-20 13:14   ` Joel Brobecker [this message]
2015-08-20 13:44     ` [RFC] " Max Filippov
2015-08-20 13:37   ` Max Filippov
2015-08-20 14:13     ` Pedro Alves
2015-08-20 20:30       ` Marc Gauthier
2015-08-21  9:49         ` Pedro Alves

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=20150820131441.GG4571@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=larue@cadence.com \
    --cc=marc@cadence.com \
    --cc=maxim2405@gmail.com \
    /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