All of lore.kernel.org
 help / color / mirror / Atom feed
* Smokey GDB test
@ 2019-07-24  6:33 hauptmech
  2019-07-24  6:46 ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: hauptmech @ 2019-07-24  6:33 UTC (permalink / raw)
  To: 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:

diff --git a/testsuite/smokey/gdb/gdb.c b/testsuite/smokey/gdb/gdb.c
index 2fad3da19..538346a04 100644
--- a/testsuite/smokey/gdb/gdb.c
+++ b/testsuite/smokey/gdb/gdb.c
@@ -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();



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Smokey GDB test
  2019-07-24  6:33 Smokey GDB test hauptmech
@ 2019-07-24  6:46 ` Jan Kiszka
  2019-07-24  7:43   ` hauptmech
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2019-07-24  6:46 UTC (permalink / raw)
  To: hauptmech, Xenomai

On 24.07.19 08:33, hauptmech via Xenomai wrote:
> 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:
> 
> diff --git a/testsuite/smokey/gdb/gdb.c b/testsuite/smokey/gdb/gdb.c
> index 2fad3da19..538346a04 100644
> --- a/testsuite/smokey/gdb/gdb.c
> +++ b/testsuite/smokey/gdb/gdb.c
> @@ -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();
> 
> 

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

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Smokey GDB test
  2019-07-24  6:46 ` Jan Kiszka
@ 2019-07-24  7:43   ` hauptmech
  2019-07-24  8:27     ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: hauptmech @ 2019-07-24  7:43 UTC (permalink / raw)
  To: Jan Kiszka, Xenomai

On 24/07/2019 6:46 PM, Jan Kiszka wrote:
> On 24.07.19 08:33, hauptmech via Xenomai wrote:
>> 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:
>>
>> diff --git a/testsuite/smokey/gdb/gdb.c b/testsuite/smokey/gdb/gdb.c
>> index 2fad3da19..538346a04 100644
>> --- a/testsuite/smokey/gdb/gdb.c
>> +++ b/testsuite/smokey/gdb/gdb.c
>> @@ -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();
>>
>>
> Was this with
> https://gitlab.denx.de/Xenomai/xenomai/commit/d48071ae92754119e504202d486cd87762c46cbb
> applied?
>
> Jan
>
No. And I would expect the -g flag to solve the problem. Sorry for the 
false alarm.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Smokey GDB test
  2019-07-24  7:43   ` hauptmech
@ 2019-07-24  8:27     ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2019-07-24  8:27 UTC (permalink / raw)
  To: hauptmech, Xenomai

On 24.07.19 09:43, hauptmech wrote:
> On 24/07/2019 6:46 PM, Jan Kiszka wrote:
>> On 24.07.19 08:33, hauptmech via Xenomai wrote:
>>> 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:
>>>
>>> diff --git a/testsuite/smokey/gdb/gdb.c b/testsuite/smokey/gdb/gdb.c
>>> index 2fad3da19..538346a04 100644
>>> --- a/testsuite/smokey/gdb/gdb.c
>>> +++ b/testsuite/smokey/gdb/gdb.c
>>> @@ -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();
>>>
>>>
>> Was this with
>> https://gitlab.denx.de/Xenomai/xenomai/commit/d48071ae92754119e504202d486cd87762c46cbb
>>
>> 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

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-24  8:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24  6:33 Smokey GDB test hauptmech
2019-07-24  6:46 ` Jan Kiszka
2019-07-24  7:43   ` hauptmech
2019-07-24  8:27     ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.