This is the mail archive of the gcc@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]

[tree-ssa] Debugging information issue.



It has been brought up before, but I'm about to make it more of an
issue.

We need a way to associate a variable for debugging purposes with a
different variable.

A simplistic example is when we make a temporary variable T.5 which we
happen to know is really the value of variable 'a', it would be nice if
the debugger knew this too, and could report the value of T.5 when asked
for 'a'.

We currently dont do anything like this in tree-ssa, and we've manage to
paper over it with things like copy-renaming so it doesnt look so bad
most of the time. 

I want to disable coalescing of ALL versions of a variable in
SSA->normal, and operate solely from the coalesce list. This will result
in different variables for distinct live ranges of a single variable:

a =   
  = a
<..>
a = 
  = a

will result in something like:

a = 
  = a
<..>
a.1 = 
  = a.1

We tend to generate better code when we do this, but we're going to lose
a lot of debugging information.

Its pretty trivial for me to mark 'a.1' as really being 'a' when I
create it, but I am not aware of a way to communicate that to the debug
generator. 

I was thinking we could put an optional debug_info decl node on decls.
When we go to generate debug info, we could simply use relevant part of
the debug_decl instead of the real decl when its present.

Perhaps thats too simplistic, but we do need to come up with a way of
doing this. Any bright ideas? Im not very familiar with how we maintain
and build the debug info.

Andrew


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