All of lore.kernel.org
 help / color / mirror / Atom feed
* debugging tools
  2001-10-04 12:58 Compiling for SuSE 7.2 James Bishop
@ 2001-10-04 17:05 ` Conan Callen
  2001-10-04 18:08   ` Stephen Smalley
  2001-10-04 19:01   ` Jose Nazario
  0 siblings, 2 replies; 9+ messages in thread
From: Conan Callen @ 2001-10-04 17:05 UTC (permalink / raw)
  To: selinux

I want to start stepping through the selinux / lsm code so I can see what
is happening. Does anyone have any recomendations on kernel debugging
tools for doing this? I've been using vstudio on windows for years and the
windows sdk debugger for working with kernel code. So far the only
tool used on linux are emacs and vi ;)

Conan


--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

* Re: debugging tools
  2001-10-04 17:05 ` debugging tools Conan Callen
@ 2001-10-04 18:08   ` Stephen Smalley
  2001-10-04 19:01   ` Jose Nazario
  1 sibling, 0 replies; 9+ messages in thread
From: Stephen Smalley @ 2001-10-04 18:08 UTC (permalink / raw)
  To: Conan Callen; +Cc: selinux


On Thu, 4 Oct 2001, Conan Callen wrote:

> I want to start stepping through the selinux / lsm code so I can see what
> is happening. Does anyone have any recomendations on kernel debugging
> tools for doing this? I've been using vstudio on windows for years and the
> windows sdk debugger for working with kernel code. So far the only
> tool used on linux are emacs and vi ;)

Is this just a learning exercise or have you encountered a bug that you
want to track down?  If you really want some kind of kernel debugger, you
might try the SGI kGDB (see http://kgdb.sourceforge.net).

--
Stephen D. Smalley, NAI Labs
ssmalley@nai.com




--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

* Re: debugging tools
  2001-10-04 17:05 ` debugging tools Conan Callen
  2001-10-04 18:08   ` Stephen Smalley
@ 2001-10-04 19:01   ` Jose Nazario
  1 sibling, 0 replies; 9+ messages in thread
From: Jose Nazario @ 2001-10-04 19:01 UTC (permalink / raw)
  To: Conan Callen; +Cc: selinux

On Thu, 4 Oct 2001, Conan Callen wrote:

> I want to start stepping through the selinux / lsm code so I can see
> what is happening. Does anyone have any recomendations on kernel
> debugging tools for doing this?


look for kprof and kdb, lkcd should also be helpful:

http://oss.sgi.com/projects/

that should be a good place to start. i think that kprof uses the same
output format as gprof so it can use the same analysis tools.

hope that helps

____________________________
jose nazario						     jose@cwru.edu
	      	     PGP: 89 B0 81 DA 5B FD 7E 00  99 C3 B2 CD 48 A0 07 80
				       PGP key ID 0xFD37F4E5 (pgp.mit.edu)


--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

* RE: debugging tools
@ 2001-10-05 13:01 Westerman, Mark
  2001-10-05 16:23 ` Conan Callen
  0 siblings, 1 reply; 9+ messages in thread
From: Westerman, Mark @ 2001-10-05 13:01 UTC (permalink / raw)
  To: 'Conan Callen', selinux

If you are trying to debug the kernel. You might want to
try uml (user mode linux) run linux as a process. I have 
not tried selinux on that yet, from my understanding it
is great for debugging kernel problems.


Mark Westerman
mark.westerman@csoconline.com

-----Original Message-----
From: Conan Callen [mailto:ccallen@windowpane.com]
Sent: Thursday, October 04, 2001 12:05 PM
To: selinux@tycho.nsa.gov
Subject: debugging tools


I want to start stepping through the selinux / lsm code so I can see what
is happening. Does anyone have any recomendations on kernel debugging
tools for doing this? I've been using vstudio on windows for years and the
windows sdk debugger for working with kernel code. So far the only
tool used on linux are emacs and vi ;)

Conan


--
You have received this message because you are subscribed to the selinux
list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov
with
the words "unsubscribe selinux" without quotes as the message.

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

* RE: debugging tools
  2001-10-05 13:01 debugging tools Westerman, Mark
@ 2001-10-05 16:23 ` Conan Callen
  0 siblings, 0 replies; 9+ messages in thread
From: Conan Callen @ 2001-10-05 16:23 UTC (permalink / raw)
  To: selinux


Thanks for all the great pointers, I have a bit of research to do now.
User mode linux looks interesting, maybe I can spend some time on it
this weekend. This reminds me of an article (specific to windows NT) from
www.sysinternals.com showing how to have a usermode app execute kernel
code in user mode. It would be interesting to be able to apply this
same technique to linux.

Conan


--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

* memset hangs part way through; called from early_init
@ 2006-06-01 17:00 Chris Dumoulin
  2006-06-01 20:32 ` Wolfgang Denk
  2006-06-08 23:08 ` Debugging tools David H. Lynch Jr.
  0 siblings, 2 replies; 9+ messages in thread
From: Chris Dumoulin @ 2006-06-01 17:00 UTC (permalink / raw)
  To: linuxppc-embedded

Hi All,
I'm running a V2Pro-based development board, and I'm working on a linux 2.6.15 port.
Currently, the board hangs in the early_init function. Specifically, at the following line:
memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);

This memset_io() call eventually calls memset() (from arch/ppc/lib/string.S) to zero the
region of memory. Using a BDI2000, I'm able to step through the assembly and see that
within memset, it enters a two-instruction loop where it is writing zeros to consecutive
memory locations. Everything is going fine, but after 10 or 20 iterations of the loop
(it's not consistent), everything blows up.

GDB reports the following:
------------------------------
(gdb) stepi

Program received signal SIG110, Real-time event 110.
0xc000b3e8 in memset ()
(gdb)
------------------------------

The BDI2000 reports the following:
------------------------------
*** MMU: address translation for 0xC000B3E8 failed
*** MMU: address translation for 0xC000B3E4 failed
*** MMU: address translation for 0xC000B3E8 failed
*** MMU: address translation for 0xC000B3E4 failed
*** MMU: address translation for 0xC000B3B0 failed
*** MMU: address translation for 0xDEADBEEF failed
*** MMU: address translation for 0xDEADBEEB failed
*** MMU: address translation for 0xDEADBEEF failed
*** MMU: address translation for 0xDEADBEEB failed
*** MMU: address translation for 0x00000000 failed
*** MMU: address translation for 0xDEADBEEF failed
*** MMU: address translation for 0xDEADBEEB failed
*** MMU: address translation for 0xDEADBEEF failed
*** MMU: address translation for 0xDEADBEEB failed
*** MMU: address translation for 0x00000000 failed
------------------------------

Here is my BDI2000 configuration file:
------------------------------
[INIT]



[TARGET]

JTAGCLOCK   0                   ;use 16 MHz JTAG clock

CPUTYPE     405 		;the used target CPU type

BDIMODE     AGENT   	        ;the BDI working mode (LOADONLY | AGENT)


BREAKMODE   HARD      	        ;SOFT or HARD, HARD uses PPC hardware breakpoint

STEPMODE    HWBP                ;JTAG or HWBP, HWPB uses one or two hardware breakpoints


MMU         XLAT 0xC0000000     ;enable virtual address mode

PTBASE      0x000000f0          ;address where kernel/user stores pointer to page table

STARTUP     RESET




[HOST]

IP          192.9.200.213


FILE        ppcboot.bin

FORMAT      BIN 0xfff80000 ;0x200000

START       0xfff80000 ; 0x200000

LOAD        MANUAL              ;load code MANUAL or AUTO after reset

DEBUGPORT   2001

DUMP        dump.bin            ;Linux: dump.bin must already exist and public writable



[FLASH]

WORKSPACE   0xffffd000

CHIPTYPE    STRATAX16

BUSWIDTH    16

CHIPSIZE    0x400000


[REGS]

IDCR1	0x010	0x011	;MEMCFGADR and MEMCFGDATA

IDCR2	0x012	0x013	;EBCCFGADR and EBCCFGDATA

IDCR3	0x014	0x015	;KIAR and KIDR

FILE    reg405gp.def
------------------------------

Any ideas would be appreciated.

Regards,
Chris Dumoulin

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

* Re: memset hangs part way through; called from early_init
  2006-06-01 17:00 memset hangs part way through; called from early_init Chris Dumoulin
@ 2006-06-01 20:32 ` Wolfgang Denk
  2006-06-08 23:08 ` Debugging tools David H. Lynch Jr.
  1 sibling, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2006-06-01 20:32 UTC (permalink / raw)
  To: Chris Dumoulin; +Cc: linuxppc-embedded

In message <200606011700.k51H0WJw014425@www-webmail1.magma.ca> you wrote:
>
> Currently, the board hangs in the early_init function. Specifically, at the following line:
> memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);
...
> Any ideas would be appreciated.

See http://www.denx.de/wiki/view/DULG/LinuxCrashesRandomly

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
A princess should not be afraid -- not with a brave knight to protect
her.
	-- McCoy, "Shore Leave", stardate 3025.3

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

* Debugging tools
  2006-06-01 17:00 memset hangs part way through; called from early_init Chris Dumoulin
  2006-06-01 20:32 ` Wolfgang Denk
@ 2006-06-08 23:08 ` David H. Lynch Jr.
  1 sibling, 0 replies; 9+ messages in thread
From: David H. Lynch Jr. @ 2006-06-08 23:08 UTC (permalink / raw)
  To: linuxppc-embedded


    I have encountered one of the rare instances where I need/want more
debugging resources than an LED on an IO port.

    I am looking for some recommendations as well as understanding of
the lighter weight debugging tools that are available.
    I am dealing with a Xilinx V4 PPC405  FPGA. It is hosted in a
computer running Windows XP. Aparently there is a JTAG port
    on the device that emulates a JTAG parallel port on LPT3 on the host
side.

    I was hoping to be able to bring up gdb, download an elf file to the
target and step through a program to see where it is going off the rails.

    A bit of research suggests that there are gdbservers that bridge
between gdb and JTAG. But all the links I have found to rproxy seem to
be broken, and those for gdbproxy seem to be
    for other processors.

  

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

* RE: Debugging tools
@ 2006-06-09  0:11 Martin, Tim
  0 siblings, 0 replies; 9+ messages in thread
From: Martin, Tim @ 2006-06-09  0:11 UTC (permalink / raw)
  To: dhlii, linuxppc-embedded

>=20
>     I was hoping to be able to bring up gdb, download an elf file to
the
> target and step through a program to see where it is going off the
rails.
>=20

Assuming you have the Xilinx EDK tools installed, there is a program
called xmd that acts as a standalone debugger or can communicate with
gdb over a socket.

>     A bit of research suggests that there are gdbservers that bridge
> between gdb and JTAG. But all the links I have found to rproxy seem to
> be broken, and those for gdbproxy seem to be
>     for other processors.

EDK builds example programs when you use the BSB.  You can download and
debug these programs as a test.  From EDK 7.1, Tools->Software Debugger.

Tim

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

end of thread, other threads:[~2006-06-09  0:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-01 17:00 memset hangs part way through; called from early_init Chris Dumoulin
2006-06-01 20:32 ` Wolfgang Denk
2006-06-08 23:08 ` Debugging tools David H. Lynch Jr.
  -- strict thread matches above, loose matches on Subject: below --
2006-06-09  0:11 Martin, Tim
2001-10-05 13:01 debugging tools Westerman, Mark
2001-10-05 16:23 ` Conan Callen
2001-10-04 12:58 Compiling for SuSE 7.2 James Bishop
2001-10-04 17:05 ` debugging tools Conan Callen
2001-10-04 18:08   ` Stephen Smalley
2001-10-04 19:01   ` Jose Nazario

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.