mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
gdb/testsuite: rename thread_local variables
C standard gnu23 introduces a new keyword 'thread_local'. So, this variables must be renamed to avoid build errors. Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
committed by
Tom Tromey
parent
c1011a70b0
commit
3d649e28eb
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
__thread int thread_local = 42;
|
||||
__thread int thread_local_var = 42;
|
||||
|
||||
int
|
||||
main (void)
|
||||
|
||||
@@ -26,4 +26,4 @@ if {![runto_main]} {
|
||||
}
|
||||
|
||||
# Formerly: Cannot access memory at address 0xffffef7c0698
|
||||
gdb_test "p (int) thread_local" " = 42" "thread local storage"
|
||||
gdb_test "p (int) thread_local_var" " = 42" "thread local storage"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
__thread int thread_local = 42;
|
||||
__thread int thread_local_var = 42;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
@@ -32,9 +32,9 @@ if {![runto_main]} {
|
||||
}
|
||||
|
||||
# Formerly: Cannot access memory at address 0x0
|
||||
gdb_test "p thread_local" "'thread_local' has unknown type; cast it to its declared type" \
|
||||
gdb_test "p thread_local_var" "'thread_local_var' has unknown type; cast it to its declared type" \
|
||||
"thread local storage, unknown type"
|
||||
gdb_test "p (int) thread_local" "= 42" \
|
||||
gdb_test "p (int) thread_local_var" "= 42" \
|
||||
"thread local storage, cast"
|
||||
|
||||
# Done!
|
||||
|
||||
Reference in New Issue
Block a user