Skip to contentSkip to conversation

Smokey GDB test

PATCH hauptmech 2 participants 4 messages Jul 24, 2019

lore
Share & tools
lore

hauptmech

author
#0 lore raw

The smokey GDB test was failing for me.

Xenomai was built with ./configure --enable-smp --enable-pshared on a x86_64 system with cobalt

GCC version (Ubuntu 7.4.0-lubuntu1~18.04.1) 7.4.0

GDB version (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git

Running the test by hand I found gdb complaining that it did not know the type of the expressions.

Casting the type in the expressions as below fixed things for me:

testsuite/smokey/gdb/gdb.c +0 -0
index 2fad3da19..538346a04 100644
@@ -285,15 +285,15 @@ static int run_gdb(struct smokey_test *t, int argc, char *const argv[])
 

             smokey_trace("resume in primary"); send_command("c\n", 1);
-            eval_expression("primary_mode", "1"); +            eval_expression("(int)primary_mode", "1"); send_command("c\n", 1);

             smokey_trace("synchronous stop");
-            eval_expression("thread_loops==expected_loops", "1");
+            eval_expression("(unsigned long long)thread_loops==(unsigned long long)expected_loops", "1"); send_command("c\n", 1);

             smokey_trace("synchronous continue");
-            eval_expression("thread_loops==expected_loops", "1");
+            eval_expression("(unsigned long long)thread_loops==(unsigned long long)expected_loops", "1");

             send_command("q\n", 0);
             pause();

#1 lore raw
Quoted 38 lines · hauptmech via Xenomai

The smokey GDB test was failing for me.

Xenomai was built with ./configure --enable-smp --enable-pshared on a x86_64 system with cobalt

GCC version (Ubuntu 7.4.0-lubuntu1~18.04.1) 7.4.0

GDB version (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git

Running the test by hand I found gdb complaining that it did not know the type of the expressions.

Casting the type in the expressions as below fixed things for me:

testsuite/smokey/gdb/gdb.c +3 -3
index 2fad3da19..538346a04 100644
@@ -285,15 +285,15 @@ static int run_gdb(struct smokey_test *t, int argc, char
 *const argv[])
 
              smokey_trace("resume in primary");
              send_command("c\n", 1);
-            eval_expression("primary_mode", "1");
+            eval_expression("(int)primary_mode", "1");
              send_command("c\n", 1);
 
              smokey_trace("synchronous stop");
-            eval_expression("thread_loops==expected_loops", "1");
+            eval_expression("(unsigned long long)thread_loops==(unsigned long
 long)expected_loops", "1");
              send_command("c\n", 1);
 
              smokey_trace("synchronous continue");
-            eval_expression("thread_loops==expected_loops", "1");
+            eval_expression("(unsigned long long)thread_loops==(unsigned long
 long)expected_loops", "1");
Quoted 4 lines

             send_command("q\n", 0);
             pause();

Was this with
https://gitlab.denx.de/Xenomai/xenomai/commit/d48071ae92754119e504202d486cd87762c46cbb
applied?

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#2 lore raw
Quoted 47 lines · Jan Kiszka
Quoted 38 lines · hauptmech via Xenomai

The smokey GDB test was failing for me.

Xenomai was built with ./configure --enable-smp --enable-pshared on a x86_64 system with cobalt

GCC version (Ubuntu 7.4.0-lubuntu1~18.04.1) 7.4.0

GDB version (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git

Running the test by hand I found gdb complaining that it did not know the type of the expressions.

Casting the type in the expressions as below fixed things for me:

testsuite/smokey/gdb/gdb.c +3 -3
index 2fad3da19..538346a04 100644
@@ -285,15 +285,15 @@ static int run_gdb(struct smokey_test *t, int argc, char
 *const argv[])
 
              smokey_trace("resume in primary");
              send_command("c\n", 1);
-            eval_expression("primary_mode", "1");
+            eval_expression("(int)primary_mode", "1");
              send_command("c\n", 1);
 
              smokey_trace("synchronous stop");
-            eval_expression("thread_loops==expected_loops", "1");
+            eval_expression("(unsigned long long)thread_loops==(unsigned long
 long)expected_loops", "1");
              send_command("c\n", 1);
 
              smokey_trace("synchronous continue");
-            eval_expression("thread_loops==expected_loops", "1");
+            eval_expression("(unsigned long long)thread_loops==(unsigned long
 long)expected_loops", "1");
Quoted 4 lines

             send_command("q\n", 0);
             pause();

Was this with
https://gitlab.denx.de/Xenomai/xenomai/commit/d48071ae92754119e504202d486cd87762c46cbb
applied?

Quoted 2 lines

Jan

No. And I would expect the -g flag to solve the problem. Sorry for the false alarm.

#3 lore raw
Quoted 47 lines · hauptmech
Quoted 46 lines · Jan Kiszka
Quoted 38 lines · hauptmech via Xenomai

The smokey GDB test was failing for me.

Xenomai was built with ./configure --enable-smp --enable-pshared on a x86_64 system with cobalt

GCC version (Ubuntu 7.4.0-lubuntu1~18.04.1) 7.4.0

GDB version (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git

Running the test by hand I found gdb complaining that it did not know the type of the expressions.

Casting the type in the expressions as below fixed things for me:

testsuite/smokey/gdb/gdb.c +3 -3
index 2fad3da19..538346a04 100644
@@ -285,15 +285,15 @@ static int run_gdb(struct smokey_test *t, int argc, char
 *const argv[])
 
               smokey_trace("resume in primary");
               send_command("c\n", 1);
-            eval_expression("primary_mode", "1");
+            eval_expression("(int)primary_mode", "1");
               send_command("c\n", 1);
 
               smokey_trace("synchronous stop");
-            eval_expression("thread_loops==expected_loops", "1");
+            eval_expression("(unsigned long long)thread_loops==(unsigned long
 long)expected_loops", "1");
               send_command("c\n", 1);
 
               smokey_trace("synchronous continue");
-            eval_expression("thread_loops==expected_loops", "1");
+            eval_expression("(unsigned long long)thread_loops==(unsigned long
 long)expected_loops", "1");
Quoted 4 lines

              send_command("q\n", 0);
              pause();

Was this with
https://gitlab.denx.de/Xenomai/xenomai/commit/d48071ae92754119e504202d486cd87762c46cbb

Quoted 6 lines
Quoted 4 lines

applied?

Jan

No. And I would expect the -g flag to solve the problem. Sorry for the false alarm.

No worries! Feedback is always appreciated.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux