Skip to content

gdb/testsuite/gdb.rocm/finish: Test small mixed struct#108

Open
lancesix wants to merge 2 commits intoamd-stagingfrom
users/lancesix/add-finish-mixed-small-struct
Open

gdb/testsuite/gdb.rocm/finish: Test small mixed struct#108
lancesix wants to merge 2 commits intoamd-stagingfrom
users/lancesix/add-finish-mixed-small-struct

Conversation

@lancesix
Copy link
Copy Markdown
Collaborator

@lancesix lancesix commented May 1, 2026

This patch extends the gdb.rocm/finish.exp testcase to cover small (up to 64 bytes) struct containing some sub 32 bits elements (short in this case) and a float element. This test is here extend our coverage of ABI stability.

Suggested-by: Qadeer, Hafiz Abid HafizAbid.Qadeer@amd.com
Change-Id: I2a56ddd7712e58d2f4fa5da21182bd4e76b1873e

@lancesix lancesix requested a review from abidh May 1, 2026 18:17
@lancesix lancesix requested a review from a team as a code owner May 1, 2026 18:17
@lancesix lancesix requested review from amd-shahab, lumachad and palves May 1, 2026 18:32
Copy link
Copy Markdown
Contributor

@abidh abidh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Comment thread gdb/testsuite/gdb.rocm/finish.exp Outdated
@lancesix lancesix force-pushed the users/lancesix/add-finish-mixed-small-struct branch 2 times, most recently from 936869e to 781fef9 Compare May 7, 2026 09:14
@lancesix
Copy link
Copy Markdown
Collaborator Author

lancesix commented May 7, 2026

I have added another patch tightening the escaping of {} in TCL.

@lumachad
Copy link
Copy Markdown
Collaborator

lumachad commented May 7, 2026

If possible, we should make sure this doesn't introduce additional optimized testsuite run failures. See https://github.com/ROCm/ROCgdb/pull/103/changes#diff-e3a7e92eaec07842270f3368e58638fc70df14eaa828b7e2fcf00a4f2dab72ca for example on how this test was adjusted to not cause FAIL's when compiled with O1~O3.

lancesix added 2 commits May 7, 2026 11:06
This patch extends the gdb.rocm/finish.exp testcase to cover small
(up to 64 bytes) struct containing some sub 32 bits elements (short in
this case) and a float element.  This test is here extend our coverage
of ABI stability.

Suggested-by: Qadeer, Hafiz Abid <HafizAbid.Qadeer@amd.com>
Change-Id: I2a56ddd7712e58d2f4fa5da21182bd4e76b1873e
The gdb.rocm/finish.exp seem to have somewhat invalid (but still
accepted) escaping of the { and } characters in the gdb_test argument.
In all cases, the argument is quoted with "", so the {} character have
no special meaning in TCL, but have in the regexpr that comes.
Therefore, the { and } char shouldb e escaped in the produced regex
(i.e. "\{"), so this should look like "\\{" in TCL.  This way TCL first
processes the backslash escpape to turn "\\" into "\", and "{" remains
unchanged.

Change-Id: Iacd5ad7eee925b0479f7090f60286c97c48f55a8
@lancesix lancesix force-pushed the users/lancesix/add-finish-mixed-small-struct branch from 781fef9 to 9b4e731 Compare May 7, 2026 10:07
@lancesix
Copy link
Copy Markdown
Collaborator Author

lancesix commented May 7, 2026

If possible, we should make sure this doesn't introduce additional optimized testsuite run failures. See https://github.com/ROCm/ROCgdb/pull/103/changes#diff-e3a7e92eaec07842270f3368e58638fc70df14eaa828b7e2fcf00a4f2dab72ca for example on how this test was adjusted to not cause FAIL's when compiled with O1~O3.

I have added __attribute__((noinline)) to the current patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants