From: Quinn Jensen <jensenq@Lineo.COM>
To: linux-mips@oss.sgi.com
Subject: Patch allowing GDB to ignore misaligned data faults
Date: Wed, 28 Feb 2001 14:42:26 -0700 [thread overview]
Message-ID: <3A9D70C2.6010504@Lineo.COM> (raw)
In-Reply-To: 000a01c0a0cf$849efbe0$dde0490a@BANANA
[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]
When using gdb on the kernel, I've found it helpful to allow
misaligned exceptions to be emulated instead of being
intercepted by gdb. The following patch does this. But is
there a better way? Perhaps a config.in option?
Or is this a case of treating the symptom? Maybe there are
far too many altogether. The network stack seems to
be littered with them--is skbuf alignment bad or something?
Ouch, I just looked and after a couple of days there have
been a lot! This machine is running with nfs root, so every
time you breathe there's a lot of network I/O.
What kind of "unaligned accesses" counts are others seeing?
/ # cat /proc/cpuinfo
cpu : MIPS
cpu model : RC32300 V0.0
system type : IDT 79S334
BogoMIPS : 149.91
byteorder : little endian
unaligned accesses : 329630
wait instruction : no
microsecond timers : no
extra interrupt vector : yes
hardware watchpoint : yes
VCED exceptions : not available
VCEI exceptions : not available
/ # uptime
2:07pm up 1 day, 21:07, load average: 0.00, 0.00, 0.00
Quinn
[-- Attachment #2: patch-gdb-stub --]
[-- Type: text/plain, Size: 638 bytes --]
diff -bpBuN -r -X - linux-sgi-cvs/arch/mips/kernel/gdb-stub.c linux+4/arch/mips/kernel/gdb-stub.c
--- linux-sgi-cvs/arch/mips/kernel/gdb-stub.c Sun Dec 3 21:04:09 2000
+++ linux+4/arch/mips/kernel/gdb-stub.c Mon Feb 26 14:56:05 2001
@@ -399,8 +399,11 @@ void set_debug_traps(void)
unsigned char c;
save_and_cli(flags);
- for (ht = hard_trap_info; ht->tt && ht->signo; ht++)
+ for (ht = hard_trap_info; ht->tt && ht->signo; ht++) {
+ /* let the emulator handle adel and ades */
+ if (ht->tt == 4 || ht->tt == 5) continue;
set_except_vector(ht->tt, trap_low);
+ }
/*
* In case GDB is started before us, ack any packets
next prev parent reply other threads:[~2001-02-28 21:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-27 15:11 binutils-2.8.1-mips.patch and egcs-1.1.2-mips.patch ? Steven Liu
2001-02-27 15:11 ` Steven Liu
2001-02-28 12:33 ` Ralf Baechle
2001-02-28 12:33 ` Ralf Baechle
2001-02-28 21:42 ` Quinn Jensen [this message]
2001-02-28 22:18 ` Patch allowing GDB to ignore misaligned data faults Jun Sun
2001-03-01 16:04 ` Quinn Jensen
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=3A9D70C2.6010504@Lineo.COM \
--to=jensenq@lineo.com \
--cc=linux-mips@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox