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 #16 from H.J. Lu <hjl.tools at gmail dot com> ---
(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.  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.

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