* [PATCH] Avoid minimal language when DW_LANG_HIP is used.
@ 2026-02-17 19:50 Allyson Cauble-Chantrenne
2026-02-18 18:39 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Allyson Cauble-Chantrenne @ 2026-02-17 19:50 UTC (permalink / raw)
To: gdb-patches; +Cc: Allyson Cauble-Chantrenne
AMD clang is going to start using DW_LANG_HIP instead of
DW_LANG_C_plus_plus_14 (see PR at
https://github.com/llvm/llvm-project/pull/181738). Rather than
falling back to the minimal language, this commit ensures that
GDB will still treat it like a C++ app. The commit also adds
a test to an existing one.
---
gdb/dwarf2/read.c | 1 +
gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index efe0b046f15..7937eb2a904 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -15147,6 +15147,7 @@ dwarf_lang_to_enum_language (ULONGEST lang)
case DW_LANG_C_plus_plus_17:
case DW_LANG_C_plus_plus_20:
case DW_LANG_C_plus_plus_23:
+ case DW_LANG_HIP:
language = language_cplus;
break;
case DW_LANG_D:
diff --git a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
index 0c15cd5a988..5ec556cac69 100644
--- a/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
+++ b/gdb/testsuite/gdb.dwarf2/comp-unit-lang.exp
@@ -67,7 +67,7 @@ proc do_test {cu_lang gdb_lang} {
}
proc do_test_with_prefix {cu_lang gdb_lang} {
- with_test_prefix $gdb_lang {
+ with_test_prefix $cu_lang\_$gdb_lang {
do_test $cu_lang $gdb_lang
}
}
@@ -77,3 +77,6 @@ proc do_test_with_prefix {cu_lang gdb_lang} {
# fallback.
do_test_with_prefix DW_LANG_C "c"
do_test_with_prefix DW_LANG_C_plus_plus "c\\+\\+"
+
+# Check that HIP shows c++ and not minimal
+do_test_with_prefix DW_LANG_HIP "c\\+\\+"
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] Avoid minimal language when DW_LANG_HIP is used.
2026-02-17 19:50 [PATCH] Avoid minimal language when DW_LANG_HIP is used Allyson Cauble-Chantrenne
@ 2026-02-18 18:39 ` Tom Tromey
2026-02-27 19:32 ` Simon Marchi
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2026-02-18 18:39 UTC (permalink / raw)
To: Allyson Cauble-Chantrenne; +Cc: gdb-patches
>>>>> Allyson Cauble-Chantrenne <acaublec@amd.com> writes:
> AMD clang is going to start using DW_LANG_HIP instead of
> DW_LANG_C_plus_plus_14 (see PR at
> https://github.com/llvm/llvm-project/pull/181738). Rather than
> falling back to the minimal language, this commit ensures that
> GDB will still treat it like a C++ app. The commit also adds
> a test to an existing one.
This looks good to me, thank you.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Avoid minimal language when DW_LANG_HIP is used.
2026-02-18 18:39 ` Tom Tromey
@ 2026-02-27 19:32 ` Simon Marchi
2026-02-27 19:39 ` Cauble-Chantrenne, Allyson
0 siblings, 1 reply; 4+ messages in thread
From: Simon Marchi @ 2026-02-27 19:32 UTC (permalink / raw)
To: Tom Tromey, Allyson Cauble-Chantrenne; +Cc: gdb-patches
On 2/18/26 1:39 PM, Tom Tromey wrote:
>>>>>> Allyson Cauble-Chantrenne <acaublec@amd.com> writes:
>
>> AMD clang is going to start using DW_LANG_HIP instead of
>> DW_LANG_C_plus_plus_14 (see PR at
>> https://github.com/llvm/llvm-project/pull/181738). Rather than
>> falling back to the minimal language, this commit ensures that
>> GDB will still treat it like a C++ app. The commit also adds
>> a test to an existing one.
>
> This looks good to me, thank you.
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom
Allyson asked me off-list to push the patch, so I went ahead and did it.
I did a minor change, I tweaked the test prefix to just include the CU
lang, since that's the unique aspect of each variant:
- with_test_prefix $gdb_lang {
+ with_test_prefix $cu_lang {
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [PATCH] Avoid minimal language when DW_LANG_HIP is used.
2026-02-27 19:32 ` Simon Marchi
@ 2026-02-27 19:39 ` Cauble-Chantrenne, Allyson
0 siblings, 0 replies; 4+ messages in thread
From: Cauble-Chantrenne, Allyson @ 2026-02-27 19:39 UTC (permalink / raw)
To: Simon Marchi, Tom Tromey; +Cc: gdb-patches
[AMD Official Use Only - AMD Internal Distribution Only]
Thank you for helping with my first binutils patch!
Till next time,
Allyson
-----Original Message-----
From: Simon Marchi <simark@simark.ca>
Sent: Friday, February 27, 2026 2:33 PM
To: Tom Tromey <tom@tromey.com>; Cauble-Chantrenne, Allyson <Allyson.Cauble-Chantrenne@amd.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Avoid minimal language when DW_LANG_HIP is used.
[You don't often get email from simark@simark.ca. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
On 2/18/26 1:39 PM, Tom Tromey wrote:
>>>>>> Allyson Cauble-Chantrenne <acaublec@amd.com> writes:
>
>> AMD clang is going to start using DW_LANG_HIP instead of
>> DW_LANG_C_plus_plus_14 (see PR at
>> https://github.com/llvm/llvm-project/pull/181738). Rather than
>> falling back to the minimal language, this commit ensures that GDB
>> will still treat it like a C++ app. The commit also adds a test to an
>> existing one.
>
> This looks good to me, thank you.
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom
Allyson asked me off-list to push the patch, so I went ahead and did it.
I did a minor change, I tweaked the test prefix to just include the CU lang, since that's the unique aspect of each variant:
- with_test_prefix $gdb_lang {
+ with_test_prefix $cu_lang {
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-27 19:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-17 19:50 [PATCH] Avoid minimal language when DW_LANG_HIP is used Allyson Cauble-Chantrenne
2026-02-18 18:39 ` Tom Tromey
2026-02-27 19:32 ` Simon Marchi
2026-02-27 19:39 ` Cauble-Chantrenne, Allyson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox