On Sun, Dec 18, 2022 at 09:38:14 -0800, Chuck Silvers wrote: > > May be the hack need to be applied only with a new special flag, say, > > KSYMS_RET? Then we can define separate DB_STGY_PROC (no heuristic) > > and DB_STGY_RET (with the heuristic). > > > > The downside is that all MD db_stack_trace_print functions need to be > > adjusted, but it actually makes sense to use both strategies there, > > b/c when we are traversing an interrupt/exception frame, the > > DB_STACK_PROC (without the heuristic) is the right thing to use, but > > unwinding a call needs DB_STACK_RET (with the new flag). > > you're right, to print the right function name we do need to distinguish > between addresses that are function return addresses and those that are not, > and the DB_STGY_RET / KSYMS_RET flags that you suggest sound like a fine way > of doing that. would you like to implement this or do you want me to do it?
I probably won't get around to it until the next weekend at the earliest and I'm not territorial about this :), so if you have time and inclination, please do, otherwise I'll do it when I get around to it. Thanks. -uwe