All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
Cc: gregkh@linuxfoundation.org, kay@vrfy.org, linux-kernel@vger.kernel.org
Subject: Re: dmesg macro in Documentation/kdump/gdbmacros.txt outdated
Date: Fri, 01 Mar 2013 08:23:30 +0100	[thread overview]
Message-ID: <51305772.5050408@gmail.com> (raw)
In-Reply-To: <20130301013127.GA28038@blumentopf>

On 01.03.2013 02:31, Andreas Fenkart wrote:
> Is there an updated version matching the changed printk structure?

I hacked something up a while ago, but it's not perfect. The code below
stops dumping too early IIRC, but I never got around to fix that. Maybe
someone wants to look at it and help debug, so we can put it into
gdbmacros.txt ...

Thanks,
Daniel


define dmesg
        set $idx = 0
        set $seq = 0

        while ($seq++ < log_next_seq)
                set $buf = log_buf + $idx
                set $log = (struct log *) $buf

                if ($log->len == 0)
                        loop_break
                end

                printf "%s\n", (char *) ($buf + sizeof(struct log))
                set $idx += $log->len
        end
end

document dmesg
dmesg
Print the content of the kernel message buffer
end


      parent reply	other threads:[~2013-03-01  7:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01  1:31 dmesg macro in Documentation/kdump/gdbmacros.txt outdated Andreas Fenkart
2013-03-01  1:57 ` Greg KH
2013-03-01  7:23 ` Daniel Mack [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51305772.5050408@gmail.com \
    --to=zonque@gmail.com \
    --cc=andreas.fenkart@streamunlimited.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.