All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/gdb: make lx-dmesg command work (reliably)
@ 2017-05-26 11:04 André Draszik
  2017-05-26 11:12 ` Jan Kiszka
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: André Draszik @ 2017-05-26 11:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jan Kiszka, Kieran Bingham

lx-dmesg needs access to the log_buf symbol from printk.c.
Unfortunately, the symbol log_buf also exists in BPF's
verifier.c and hence gdb can pick one or the other. If it
happens to pick BPF's log_buf, lx-dmesg doesn't work:

  (gdb) lx-dmesg
  Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x0:
  Error occurred in Python command: Cannot access memory at address 0x0
  (gdb) p log_buf
  $15 = 0x0

Luckily, GDB has a way to deal with this, see
  https://sourceware.org/gdb/onlinedocs/gdb/Symbols.html

  (gdb) info variables ^log_buf$
  All variables matching regular expression "^log_buf$":

  File <linux.git>/kernel/bpf/verifier.c:
  static char *log_buf;

  File <linux.git>/kernel/printk/printk.c:
  static char *log_buf;
  (gdb) p 'verifier.c'::log_buf
  $1 = 0x0
  (gdb) p 'printk.c'::log_buf
  $2 = 0x811a6aa0 <__log_buf> ""

By being explicit about the location of the symbol, we
can make lx-dmesg work again. While at it, do the same
for the other symbols we need from printk.c

Signed-off-by: André Draszik <git@andred.net>
---
 scripts/gdb/linux/dmesg.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py
index f9b92ece7834..11f2397d40ed 100644
--- a/scripts/gdb/linux/dmesg.py
+++ b/scripts/gdb/linux/dmesg.py
@@ -23,10 +23,10 @@ class LxDmesg(gdb.Command):
         super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
 
     def invoke(self, arg, from_tty):
-        log_buf_addr = int(str(gdb.parse_and_eval("log_buf")).split()[0], 16)
-        log_first_idx = int(gdb.parse_and_eval("log_first_idx"))
-        log_next_idx = int(gdb.parse_and_eval("log_next_idx"))
-        log_buf_len = int(gdb.parse_and_eval("log_buf_len"))
+        log_buf_addr = int(str(gdb.parse_and_eval("'printk.c'::log_buf")).split()[0], 16)
+        log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
+        log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
+        log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
 
         inf = gdb.inferiors()[0]
         start = log_buf_addr + log_first_idx
-- 
2.11.0

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

* Re: [PATCH] scripts/gdb: make lx-dmesg command work (reliably)
  2017-05-26 11:04 [PATCH] scripts/gdb: make lx-dmesg command work (reliably) André Draszik
@ 2017-05-26 11:12 ` Jan Kiszka
  2017-05-27 14:01   ` Andy Shevchenko
  2017-05-26 11:13 ` [PATCH v2] " André Draszik
  2017-05-26 11:22 ` [PATCH v3] " André Draszik
  2 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2017-05-26 11:12 UTC (permalink / raw)
  To: André Draszik, linux-kernel; +Cc: Kieran Bingham

On 2017-05-26 13:04, André Draszik wrote:
> lx-dmesg needs access to the log_buf symbol from printk.c.
> Unfortunately, the symbol log_buf also exists in BPF's
> verifier.c and hence gdb can pick one or the other. If it
> happens to pick BPF's log_buf, lx-dmesg doesn't work:
> 
>   (gdb) lx-dmesg
>   Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x0:
>   Error occurred in Python command: Cannot access memory at address 0x0
>   (gdb) p log_buf
>   $15 = 0x0
> 
> Luckily, GDB has a way to deal with this, see
>   https://sourceware.org/gdb/onlinedocs/gdb/Symbols.html
> 
>   (gdb) info variables ^log_buf$
>   All variables matching regular expression "^log_buf$":
> 
>   File <linux.git>/kernel/bpf/verifier.c:
>   static char *log_buf;
> 
>   File <linux.git>/kernel/printk/printk.c:
>   static char *log_buf;
>   (gdb) p 'verifier.c'::log_buf
>   $1 = 0x0
>   (gdb) p 'printk.c'::log_buf
>   $2 = 0x811a6aa0 <__log_buf> ""
> 
> By being explicit about the location of the symbol, we
> can make lx-dmesg work again. While at it, do the same
> for the other symbols we need from printk.c
> 
> Signed-off-by: André Draszik <git@andred.net>
> ---
>  scripts/gdb/linux/dmesg.py | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py
> index f9b92ece7834..11f2397d40ed 100644
> --- a/scripts/gdb/linux/dmesg.py
> +++ b/scripts/gdb/linux/dmesg.py
> @@ -23,10 +23,10 @@ class LxDmesg(gdb.Command):
>          super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
>  
>      def invoke(self, arg, from_tty):
> -        log_buf_addr = int(str(gdb.parse_and_eval("log_buf")).split()[0], 16)
> -        log_first_idx = int(gdb.parse_and_eval("log_first_idx"))
> -        log_next_idx = int(gdb.parse_and_eval("log_next_idx"))
> -        log_buf_len = int(gdb.parse_and_eval("log_buf_len"))
> +        log_buf_addr = int(str(gdb.parse_and_eval("'printk.c'::log_buf")).split()[0], 16)

Overlong line. Please stay pep8 compliant.

> +        log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
> +        log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
> +        log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
>  
>          inf = gdb.inferiors()[0]
>          start = log_buf_addr + log_first_idx
> 

Looks good otherwise, thanks for addressing this!

Jan

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

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

* [PATCH v2] scripts/gdb: make lx-dmesg command work (reliably)
  2017-05-26 11:04 [PATCH] scripts/gdb: make lx-dmesg command work (reliably) André Draszik
  2017-05-26 11:12 ` Jan Kiszka
@ 2017-05-26 11:13 ` André Draszik
  2017-05-26 11:22 ` [PATCH v3] " André Draszik
  2 siblings, 0 replies; 8+ messages in thread
From: André Draszik @ 2017-05-26 11:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jan Kiszka, Kieran Bingham

lx-dmesg needs access to the log_buf symbol from printk.c.
Unfortunately, the symbol log_buf also exists in BPF's
verifier.c and hence gdb can pick one or the other. If it
happens to pick BPF's log_buf, lx-dmesg doesn't work:

  (gdb) lx-dmesg
  Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x0:
  Error occurred in Python command: Cannot access memory at address 0x0
  (gdb) p log_buf
  $15 = 0x0

Luckily, GDB has a way to deal with this, see
  https://sourceware.org/gdb/onlinedocs/gdb/Symbols.html

  (gdb) info variables ^log_buf$
  All variables matching regular expression "^log_buf$":

  File <linux.git>/kernel/bpf/verifier.c:
  static char *log_buf;

  File <linux.git>/kernel/printk/printk.c:
  static char *log_buf;
  (gdb) p 'verifier.c'::log_buf
  $1 = 0x0
  (gdb) p 'printk.c'::log_buf
  $2 = 0x811a6aa0 <__log_buf> ""
  (gdb) p &log_buf
  $3 = (char **) 0x8120fe40 <log_buf>
  (gdb) p &'verifier.c'::log_buf
  $4 = (char **) 0x8120fe40 <log_buf>
  (gdb) p &'printk.c'::log_buf
  $5 = (char **) 0x8048b7d0 <log_buf>

By being explicit about the location of the symbol, we
can make lx-dmesg work again. While at it, do the same
for the other symbols we need from printk.c

Signed-off-by: André Draszik <git@andred.net>

---
v2: Commit message slightly updated
---
 scripts/gdb/linux/dmesg.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py
index f9b92ece7834..11f2397d40ed 100644
--- a/scripts/gdb/linux/dmesg.py
+++ b/scripts/gdb/linux/dmesg.py
@@ -23,10 +23,10 @@ class LxDmesg(gdb.Command):
         super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
 
     def invoke(self, arg, from_tty):
-        log_buf_addr = int(str(gdb.parse_and_eval("log_buf")).split()[0], 16)
-        log_first_idx = int(gdb.parse_and_eval("log_first_idx"))
-        log_next_idx = int(gdb.parse_and_eval("log_next_idx"))
-        log_buf_len = int(gdb.parse_and_eval("log_buf_len"))
+        log_buf_addr = int(str(gdb.parse_and_eval("'printk.c'::log_buf")).split()[0], 16)
+        log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
+        log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
+        log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
 
         inf = gdb.inferiors()[0]
         start = log_buf_addr + log_first_idx
-- 
2.11.0

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

* [PATCH v3] scripts/gdb: make lx-dmesg command work (reliably)
  2017-05-26 11:04 [PATCH] scripts/gdb: make lx-dmesg command work (reliably) André Draszik
  2017-05-26 11:12 ` Jan Kiszka
  2017-05-26 11:13 ` [PATCH v2] " André Draszik
@ 2017-05-26 11:22 ` André Draszik
  2017-05-26 11:28   ` Jan Kiszka
  2 siblings, 1 reply; 8+ messages in thread
From: André Draszik @ 2017-05-26 11:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jan Kiszka, Kieran Bingham

lx-dmesg needs access to the log_buf symbol from printk.c.
Unfortunately, the symbol log_buf also exists in BPF's
verifier.c and hence gdb can pick one or the other. If it
happens to pick BPF's log_buf, lx-dmesg doesn't work:

  (gdb) lx-dmesg
  Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x0:
  Error occurred in Python command: Cannot access memory at address 0x0
  (gdb) p log_buf
  $15 = 0x0

Luckily, GDB has a way to deal with this, see
  https://sourceware.org/gdb/onlinedocs/gdb/Symbols.html

  (gdb) info variables ^log_buf$
  All variables matching regular expression "^log_buf$":

  File <linux.git>/kernel/bpf/verifier.c:
  static char *log_buf;

  File <linux.git>/kernel/printk/printk.c:
  static char *log_buf;
  (gdb) p 'verifier.c'::log_buf
  $1 = 0x0
  (gdb) p 'printk.c'::log_buf
  $2 = 0x811a6aa0 <__log_buf> ""
  (gdb) p &log_buf
  $3 = (char **) 0x8120fe40 <log_buf>
  (gdb) p &'verifier.c'::log_buf
  $4 = (char **) 0x8120fe40 <log_buf>
  (gdb) p &'printk.c'::log_buf
  $5 = (char **) 0x8048b7d0 <log_buf>

By being explicit about the location of the symbol, we
can make lx-dmesg work again. While at it, do the same
for the other symbols we need from printk.c

Signed-off-by: André Draszik <git@andred.net>

---
v3: pep8 compliant
v2: Commit message slightly updated
---
 scripts/gdb/linux/dmesg.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py
index f9b92ece7834..5afd1098e33a 100644
--- a/scripts/gdb/linux/dmesg.py
+++ b/scripts/gdb/linux/dmesg.py
@@ -23,10 +23,11 @@ class LxDmesg(gdb.Command):
         super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
 
     def invoke(self, arg, from_tty):
-        log_buf_addr = int(str(gdb.parse_and_eval("log_buf")).split()[0], 16)
-        log_first_idx = int(gdb.parse_and_eval("log_first_idx"))
-        log_next_idx = int(gdb.parse_and_eval("log_next_idx"))
-        log_buf_len = int(gdb.parse_and_eval("log_buf_len"))
+        log_buf_addr = int(str(gdb.parse_and_eval(
+            "'printk.c'::log_buf")).split()[0], 16)
+        log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
+        log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
+        log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
 
         inf = gdb.inferiors()[0]
         start = log_buf_addr + log_first_idx
-- 
2.11.0

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

* Re: [PATCH v3] scripts/gdb: make lx-dmesg command work (reliably)
  2017-05-26 11:22 ` [PATCH v3] " André Draszik
@ 2017-05-26 11:28   ` Jan Kiszka
  2017-05-31  5:10     ` Kieran Bingham
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2017-05-26 11:28 UTC (permalink / raw)
  To: André Draszik, linux-kernel, Andrew Morton; +Cc: Kieran Bingham

On 2017-05-26 13:22, André Draszik wrote:
> lx-dmesg needs access to the log_buf symbol from printk.c.
> Unfortunately, the symbol log_buf also exists in BPF's
> verifier.c and hence gdb can pick one or the other. If it
> happens to pick BPF's log_buf, lx-dmesg doesn't work:
> 
>   (gdb) lx-dmesg
>   Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x0:
>   Error occurred in Python command: Cannot access memory at address 0x0
>   (gdb) p log_buf
>   $15 = 0x0
> 
> Luckily, GDB has a way to deal with this, see
>   https://sourceware.org/gdb/onlinedocs/gdb/Symbols.html
> 
>   (gdb) info variables ^log_buf$
>   All variables matching regular expression "^log_buf$":
> 
>   File <linux.git>/kernel/bpf/verifier.c:
>   static char *log_buf;
> 
>   File <linux.git>/kernel/printk/printk.c:
>   static char *log_buf;
>   (gdb) p 'verifier.c'::log_buf
>   $1 = 0x0
>   (gdb) p 'printk.c'::log_buf
>   $2 = 0x811a6aa0 <__log_buf> ""
>   (gdb) p &log_buf
>   $3 = (char **) 0x8120fe40 <log_buf>
>   (gdb) p &'verifier.c'::log_buf
>   $4 = (char **) 0x8120fe40 <log_buf>
>   (gdb) p &'printk.c'::log_buf
>   $5 = (char **) 0x8048b7d0 <log_buf>
> 
> By being explicit about the location of the symbol, we
> can make lx-dmesg work again. While at it, do the same
> for the other symbols we need from printk.c
> 
> Signed-off-by: André Draszik <git@andred.net>
> 
> ---
> v3: pep8 compliant
> v2: Commit message slightly updated
> ---
>  scripts/gdb/linux/dmesg.py | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py
> index f9b92ece7834..5afd1098e33a 100644
> --- a/scripts/gdb/linux/dmesg.py
> +++ b/scripts/gdb/linux/dmesg.py
> @@ -23,10 +23,11 @@ class LxDmesg(gdb.Command):
>          super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
>  
>      def invoke(self, arg, from_tty):
> -        log_buf_addr = int(str(gdb.parse_and_eval("log_buf")).split()[0], 16)
> -        log_first_idx = int(gdb.parse_and_eval("log_first_idx"))
> -        log_next_idx = int(gdb.parse_and_eval("log_next_idx"))
> -        log_buf_len = int(gdb.parse_and_eval("log_buf_len"))
> +        log_buf_addr = int(str(gdb.parse_and_eval(
> +            "'printk.c'::log_buf")).split()[0], 16)
> +        log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
> +        log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
> +        log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
>  
>          inf = gdb.inferiors()[0]
>          start = log_buf_addr + log_first_idx
> 

Acked-by: Jan Kiszka <jan.kiszka@siemens.com>

Andrew, please include in your queue.

Jan

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

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

* Re: [PATCH] scripts/gdb: make lx-dmesg command work (reliably)
  2017-05-26 11:12 ` Jan Kiszka
@ 2017-05-27 14:01   ` Andy Shevchenko
  2017-05-28 16:29     ` Jan Kiszka
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2017-05-27 14:01 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: André Draszik, linux-kernel, Kieran Bingham

On Fri, May 26, 2017 at 2:12 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 2017-05-26 13:04, André Draszik wrote:

>> +        log_buf_addr = int(str(gdb.parse_and_eval("'printk.c'::log_buf")).split()[0], 16)
>
> Overlong line. Please stay pep8 compliant.

What I heard from colleague of mine couple of years ago, they (their
team) moved to 100 characters in Python scripts because of somehow
stupid recommendations from last century.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH] scripts/gdb: make lx-dmesg command work (reliably)
  2017-05-27 14:01   ` Andy Shevchenko
@ 2017-05-28 16:29     ` Jan Kiszka
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2017-05-28 16:29 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: André Draszik, linux-kernel, Kieran Bingham

On 2017-05-27 16:01, Andy Shevchenko wrote:
> On Fri, May 26, 2017 at 2:12 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> On 2017-05-26 13:04, André Draszik wrote:
> 
>>> +        log_buf_addr = int(str(gdb.parse_and_eval("'printk.c'::log_buf")).split()[0], 16)
>>
>> Overlong line. Please stay pep8 compliant.
> 
> What I heard from colleague of mine couple of years ago, they (their
> team) moved to 100 characters in Python scripts because of somehow
> stupid recommendations from last century.

Well, it happens to be in line with the kernel preference for C code. We
can discuss a different style when the kernel relaxes its own. ;)

Jan

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

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

* Re: [PATCH v3] scripts/gdb: make lx-dmesg command work (reliably)
  2017-05-26 11:28   ` Jan Kiszka
@ 2017-05-31  5:10     ` Kieran Bingham
  0 siblings, 0 replies; 8+ messages in thread
From: Kieran Bingham @ 2017-05-31  5:10 UTC (permalink / raw)
  To: Jan Kiszka, André Draszik, linux-kernel, Andrew Morton

Hi André, Jan, Andrew,

On 26/05/17 20:28, Jan Kiszka wrote:
> On 2017-05-26 13:22, André Draszik wrote:
>> lx-dmesg needs access to the log_buf symbol from printk.c.
>> Unfortunately, the symbol log_buf also exists in BPF's
>> verifier.c and hence gdb can pick one or the other. If it
>> happens to pick BPF's log_buf, lx-dmesg doesn't work:
>>
>>   (gdb) lx-dmesg
>>   Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x0:
>>   Error occurred in Python command: Cannot access memory at address 0x0
>>   (gdb) p log_buf
>>   $15 = 0x0
>>
>> Luckily, GDB has a way to deal with this, see
>>   https://sourceware.org/gdb/onlinedocs/gdb/Symbols.html
>>
>>   (gdb) info variables ^log_buf$
>>   All variables matching regular expression "^log_buf$":
>>
>>   File <linux.git>/kernel/bpf/verifier.c:
>>   static char *log_buf;
>>
>>   File <linux.git>/kernel/printk/printk.c:
>>   static char *log_buf;
>>   (gdb) p 'verifier.c'::log_buf
>>   $1 = 0x0
>>   (gdb) p 'printk.c'::log_buf
>>   $2 = 0x811a6aa0 <__log_buf> ""
>>   (gdb) p &log_buf
>>   $3 = (char **) 0x8120fe40 <log_buf>
>>   (gdb) p &'verifier.c'::log_buf
>>   $4 = (char **) 0x8120fe40 <log_buf>
>>   (gdb) p &'printk.c'::log_buf
>>   $5 = (char **) 0x8048b7d0 <log_buf>
>>
>> By being explicit about the location of the symbol, we
>> can make lx-dmesg work again. While at it, do the same
>> for the other symbols we need from printk.c
>>
>> Signed-off-by: André Draszik <git@andred.net>

Nice to see you again André :D

>> ---
>> v3: pep8 compliant
>> v2: Commit message slightly updated
>> ---
>>  scripts/gdb/linux/dmesg.py | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb/linux/dmesg.py
>> index f9b92ece7834..5afd1098e33a 100644
>> --- a/scripts/gdb/linux/dmesg.py
>> +++ b/scripts/gdb/linux/dmesg.py
>> @@ -23,10 +23,11 @@ class LxDmesg(gdb.Command):
>>          super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA)
>>  
>>      def invoke(self, arg, from_tty):
>> -        log_buf_addr = int(str(gdb.parse_and_eval("log_buf")).split()[0], 16)
>> -        log_first_idx = int(gdb.parse_and_eval("log_first_idx"))
>> -        log_next_idx = int(gdb.parse_and_eval("log_next_idx"))
>> -        log_buf_len = int(gdb.parse_and_eval("log_buf_len"))
>> +        log_buf_addr = int(str(gdb.parse_and_eval(
>> +            "'printk.c'::log_buf")).split()[0], 16)
>> +        log_first_idx = int(gdb.parse_and_eval("'printk.c'::log_first_idx"))
>> +        log_next_idx = int(gdb.parse_and_eval("'printk.c'::log_next_idx"))
>> +        log_buf_len = int(gdb.parse_and_eval("'printk.c'::log_buf_len"))
>>  
>>          inf = gdb.inferiors()[0]
>>          start = log_buf_addr + log_first_idx
>>
> 
> Acked-by: Jan Kiszka <jan.kiszka@siemens.com>

Sorry for the delay - I'm in Tokyo for Linux OSS Japan.

This looks good to me and I've verified it locally.

Tested-by: Kieran Bingham <kieran@bingham.xyz>

> 
> Andrew, please include in your queue.
>
> Jan
> 

-- 
Regards

Kieran Bingham

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

end of thread, other threads:[~2017-05-31  5:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 11:04 [PATCH] scripts/gdb: make lx-dmesg command work (reliably) André Draszik
2017-05-26 11:12 ` Jan Kiszka
2017-05-27 14:01   ` Andy Shevchenko
2017-05-28 16:29     ` Jan Kiszka
2017-05-26 11:13 ` [PATCH v2] " André Draszik
2017-05-26 11:22 ` [PATCH v3] " André Draszik
2017-05-26 11:28   ` Jan Kiszka
2017-05-31  5:10     ` Kieran Bingham

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.