Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   bt -g not working since 5.1.9? (http://www.linux-archive.org/crash-utility/655441-bt-g-not-working-since-5-1-9-a.html)

Petr Tesarik 04-12-2012 09:02 PM

bt -g not working since 5.1.9?
 
Hi,

I noticed that the "-g" option to "bt" seems to have no effect in recent crash
versions. And indeed, 5.1.8-to-5.1.9.patch contains the following chunk:

--- crash-5.1.8/kernel.c 2011-10-17 14:06:31.000000000 -0400
+++ crash-5.1.9/kernel.c 2011-09-28 15:31:00.000000000 -0400
@@ -1876,10 +1896,10 @@ cmd_bt(void)
break;

case 'g':
-#if defined(GDB_6_0) || defined(GDB_6_1) || defined(GDB_7_0)
- bt->flags |= BT_THREAD_GROUP;
-#else
+#ifdef GDB_5_3
bt->flags |= BT_USE_GDB;
+else
+ bt->flags |= BT_THREAD_GROUP;
#endif
break;

Note that the hash sign is missing, so the pre-processor only leaves the
"break" statement... The following patch seems to help.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

--- a/kernel.c
+++ b/kernel.c
@@ -1922,7 +1922,7 @@ cmd_bt(void)
case 'g':
#ifdef GDB_5_3
bt->flags |= BT_USE_GDB;
-else
+#else
bt->flags |= BT_THREAD_GROUP;
#endif
break;

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Dave Anderson 04-12-2012 09:25 PM

bt -g not working since 5.1.9?
 
----- Original Message -----
> Hi,
>
> I noticed that the "-g" option to "bt" seems to have no effect in recent crash
> versions. And indeed, 5.1.8-to-5.1.9.patch contains the following chunk:
>
> --- crash-5.1.8/kernel.c 2011-10-17 14:06:31.000000000 -0400
> +++ crash-5.1.9/kernel.c 2011-09-28 15:31:00.000000000 -0400
> @@ -1876,10 +1896,10 @@ cmd_bt(void)
> break;
>
> case 'g':
> -#if defined(GDB_6_0) || defined(GDB_6_1) || defined(GDB_7_0)
> - bt->flags |= BT_THREAD_GROUP;
> -#else
> +#ifdef GDB_5_3
> bt->flags |= BT_USE_GDB;
> +else
> + bt->flags |= BT_THREAD_GROUP;
> #endif
> break;
>
> Note that the hash sign is missing, so the pre-processor only leaves the
> "break" statement... The following patch seems to help.
>
> Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
>
> --- a/kernel.c
> +++ b/kernel.c
> @@ -1922,7 +1922,7 @@ cmd_bt(void)
> case 'g':
> #ifdef GDB_5_3
> bt->flags |= BT_USE_GDB;
> -else
> +#else
> bt->flags |= BT_THREAD_GROUP;
> #endif
> break;
>

Petr,

Good catch -- queued for crash-6.0.6.

Thanks,
Dave

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 12:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.