It was pointed out that posting patches directly to the list is preferred over Gerrit, so I abandoned the Gerrit review and I'm attaching the patch here. The wiki says a git-format-patch'd attachment is OK, but let me know if it isn't the norm! Scott On 2020-03-18 16:43, scott@scottlinder.com wrote: > AMD is working on a port of GDB for our GPUs based on the ROCm stack > (https://rocm.github.io/). We recently open-sourced the fork at > https://github.com/ROCm-Developer-Tools/ROCgdb. We hope to begin > upstreaming > patches where possible, > and https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/767 is the > first > such patch. > > We frequently have functions inlined into the outermost frame. The > current > implementation which introduced `outer_frame_id` as a "valid" ID > distinct from > `null_frame_id` does not support this, asserting the need for both a > valid > and non-`outer_frame_id` ID to base the ID of the inlined frame on. > > This patch changes the definition of `outer_frame_id` slightly to > effectively > represent a class of IDs which identify a frame inlined into the outer > frame. > These differ in `artificial_depth`, but otherwise behave just as > `outer_frame_id` in that they are `FID_STACK_INVALID`, yet `frame_id_p` > returns > `true` and they compare equal to each other. > > Running the testsuite both with and without the patch doesn't yield any > obvious > regressions, although I have not come up with a test case to prove this > out on > e.g. x86. > > Does this seem reasonable? It is a bit of a hack on a hack, considering > the > existing issues with `outer_frame_id` and the obvious desire to remove > it > completely. At the same time, there is a fair amount of thought and > effort > involved in making that change, and I think it can/should be done > independently > of fixing this bug. My feeling is this patch is a pretty non-invasive > change > that doesn't make the situation fundamentally worse, but any feedback > is > appreciated. > > Cheers, > Scott