Hacker News new | ask | show | jobs
by userbinator 1352 days ago
So in the general case, it's quite a complex problem.

I'm not talking about "the general case". I'm referring to all the cases where the compiler obviously should know where the value is, yet the debugger somehow doesn't.

2 comments

> I'm referring to all the cases where the compiler obviously should know where the value is, yet the debugger somehow doesn't.

Soooommmee of this can be explained by the design decisions in the compiler not lending themselves to working well with debug-info, as explained here [0] (shamless plug), from about 3 minutes in there's an example of a scenario where a variable location has to be discarded out of conservative precaution (4:40 to 7:00), rather than because it's definitely been optimised out.

[0] https://www.youtube.com/watch?v=yxuwfNnp064&t=45s

But there are plenty of cases where a debugger can tell you the value of variables which are definitely in registers, such as with function arguments.

So this complaint really is about cases related to the optimizer which, as mentioned, is a very complex issue.