All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: dual line backtraces for i386.
Date: Thu, 5 Jan 2006 01:22:08 -0500	[thread overview]
Message-ID: <20060105062208.GA12095@redhat.com> (raw)

Another 'get better debug info from users' patch.
x86-64 has had this since day one, and I don't know why
no-one ever ported it to i386.

Instead of using one line per function call in the backtrace,
we can fit two per line.

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6.15/arch/i386/kernel/traps.c~	2005-12-01 04:25:36.000000000 -0500
+++ linux-2.6.15/arch/i386/kernel/traps.c	2005-12-01 04:36:19.000000000 -0500
@@ -116,6 +116,7 @@ static inline unsigned long print_contex
 				unsigned long *stack, unsigned long ebp)
 {
 	unsigned long addr;
+	char space=0;
 
 #ifdef	CONFIG_FRAME_POINTER
 	while (valid_stack_ptr(tinfo, (void *)ebp)) {
@@ -131,9 +132,17 @@ static inline unsigned long print_contex
 		if (__kernel_text_address(addr)) {
 			printk(" [<%08lx>]", addr);
 			print_symbol(" %s", addr);
-			printk("\n");
+			if (space == 0) {
+				printk("    ");
+				space = 1;
+			} else {
+				printk("\n");
+				space = 0;
+			}
 		}
 	}
+	if (space==1)
+		printk("\n");
 #endif
 	return ebp;
 }

             reply	other threads:[~2006-01-05  6:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-05  6:22 Dave Jones [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-01-05 18:18 dual line backtraces for i386 Chuck Ebbert
2006-01-05 21:28 ` Dave Jones
2006-01-06 18:36 Chuck Ebbert
2006-01-06 19:17 ` Jan Engelhardt
2006-01-06 19:33   ` Bob Copeland
2006-01-07  0:00     ` Mitchell Blank Jr
2006-01-07 11:16       ` Jan Engelhardt

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=20060105062208.GA12095@redhat.com \
    --to=davej@redhat.com \
    --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.