Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1397099
| From | Baoquan He <bhe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels |
| Date | 2016-05-09 16:40 +0200 |
| Message-ID | <rwUvM-7tx-13@gated-at.bofh.it> (permalink) |
| References | <r65yA-5kc-47@gated-at.bofh.it> <rswLo-1cD-23@gated-at.bofh.it> <rwLLQ-64x-5@gated-at.bofh.it> <rwSkh-5t9-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 05/09/16 at 07:10am, Corey Minyard wrote:
> On 05/09/2016 12:18 AM, Baoquan He wrote:
> >Hi Corey,
> >
> >I am trying to review this patch now, and these fixes contained are very
> >great. Just several concerns are added in inline comment.
> >
> >By the way, did you run this in your side?
>
> Yes, I tested on x86, x86_64, ARM and MIPS.
>
> Comments inline...
That's awesome. I will have a try too.
> >>>diff --git a/Documentation/kdump/gdbmacros.txt b/Documentation/kdump/gdbmacros.txt
> >>>index 9b9b454..e5bbd8d 100644
> >>>--- a/Documentation/kdump/gdbmacros.txt
> >>>+++ b/Documentation/kdump/gdbmacros.txt
> >>>@@ -15,14 +15,14 @@
> >>> define bttnobp
> >>> set $tasks_off=((size_t)&((struct task_struct *)0)->tasks)
> >>>- set $pid_off=((size_t)&((struct task_struct *)0)->pids[1].pid_list.next)
> >>>+ set $pid_off=((size_t)&((struct task_struct *)0)->thread_group.next)
> >This is a quite nice fix.
> >
> >>> set $init_t=&init_task
> >>> set $next_t=(((char *)($init_t->tasks).next) - $tasks_off)
> >>> while ($next_t != $init_t)
> >>> set $next_t=(struct task_struct *)$next_t
> >>> printf "\npid %d; comm %s:\n", $next_t.pid, $next_t.comm
> >>> printf "===================\n"
> >>>- set var $stackp = $next_t.thread.esp
> >>>+ set var $stackp = $next_t.thread.sp
> >>> set var $stack_top = ($stackp & ~4095) + 4096
Missed one place here. Currently the kernel stack is decided by
THREAD_SIZE since the definition:
union thread_union {
struct thread_info thread_info;
unsigned long stack[THREAD_SIZE/sizeof(long)];
};
Should we get the top and bottom of stack according to this now?
Correct me if I was wrong.
Thanks
Baoquan
> >>> while ($stackp < $stack_top)
> >>>@@ -31,12 +31,12 @@ define bttnobp
> >>> end
> >>> set $stackp += 4
> >>> end
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels Baoquan He <bhe@redhat.com> - 2016-05-09 07:20 +0200
Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels Corey Minyard <minyard@acm.org> - 2016-05-09 14:20 +0200
Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels Baoquan He <bhe@redhat.com> - 2016-05-09 16:40 +0200
Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels Corey Minyard <cminyard@mvista.com> - 2016-05-09 17:50 +0200
Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels Baoquan He <bhe@redhat.com> - 2016-05-10 03:40 +0200
Re: [PATCH] kdump: Fix gdb macros work work with newer and 64-bit kernels Baoquan He <bhe@redhat.com> - 2016-05-10 03:50 +0200
csiph-web