This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug target/70220] [x86] interrupt attribute optionally needs to provide read, write and control the set of saved registers


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70220

--- Comment #17 from Wink Saville <wink at saville dot com> ---
(In reply to H.J. Lu from comment #16)
> (In reply to Wink Saville from comment #15)
> > (In reply to H.J. Lu from comment #14)
> > > (In reply to Wink Saville from comment #13)
> > > > > Compiler should be free to use rbp in anyway it sees fit. Spec shouldn't
> > > > > say anything other than rbp is special to compiler.
> > > > 
> > > > If the compiler does decide to change rbp it must save original value,
> > > > correct?
> > > 
> > > Yes.  But you don't know how/when it happens.
> > 
> > For the debugger use case and maybe for the thread context switch I need
> > access to all registers original values, rbp included.
> >
> > I'd like to propose, for the narrow case of using the "all" parameter we
> > specify that the compiler will either always not use rbp or that it always
> > saves rbp at a known location. In all other cases rbp is unavailable for use
> > by C code.
> 
> I assume you were referring to real debugger, like GDB.  Spec won't specify
> where/how/when any register is saved.

>From my perspective the spec defines precisely where the original value of
every register is, when "all" is present, except rbp. Will you provide that
info?

If not then as for as I can tell I won't be able to use the interrupt attribute
for these use cases, which I think is a shame as I really like using it.


 Compiler should generate correct debug
> info when -g is given.  GDB should have no problem to access any registers
> and variables, including interrupt data passed down by processors.

To debug code -g is not needed, I will not be compiling my isr's with -g to be
able to debug code that resides in another thread/process. 
But to debug code I must know the original value of every register and be able
to change it to any value the user requests, no exceptions.

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