From b5128d344ce80cbfc6aa8fd6d84bcddc7e142fb1 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 20 Nov 2008 22:23:44 +0100 Subject: Add copyright and licensing header. --- hurd/debugging/glibc.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hurd/debugging') diff --git a/hurd/debugging/glibc.mdwn b/hurd/debugging/glibc.mdwn index a0890fe8..f0fe8b61 100644 --- a/hurd/debugging/glibc.mdwn +++ b/hurd/debugging/glibc.mdwn @@ -1,3 +1,13 @@ +[[meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] + +[[meta license="""[[toggle id="license" text="GFDL 1.2+"]][[toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU_Free_Documentation_License|/fdl]]."]]"""]] + Here are some hints about how to approach testing after nontrivial changes to glibc have been done. -- cgit v1.2.3 From b1d42782501e37daf05c63d68f23a712babc8e09 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 20 Nov 2008 22:33:22 +0100 Subject: hurd/debugging/hurd -> hurd/debugging/translator/gdb --- hurd/debugging.mdwn | 4 +-- hurd/debugging/hurd.mdwn | 53 -------------------------------------- hurd/debugging/translator.mdwn | 13 ++++++++++ hurd/debugging/translator/gdb.mdwn | 53 ++++++++++++++++++++++++++++++++++++++ hurd/translator.mdwn | 3 +++ 5 files changed, 71 insertions(+), 55 deletions(-) delete mode 100644 hurd/debugging/hurd.mdwn create mode 100644 hurd/debugging/translator.mdwn create mode 100644 hurd/debugging/translator/gdb.mdwn (limited to 'hurd/debugging') diff --git a/hurd/debugging.mdwn b/hurd/debugging.mdwn index b84c5675..e4a98672 100644 --- a/hurd/debugging.mdwn +++ b/hurd/debugging.mdwn @@ -18,5 +18,5 @@ is included in the section entitled # About Specific Packages -* [[glibc]] -* [[Hurd]] + * [[glibc]] + * [[translator]]s diff --git a/hurd/debugging/hurd.mdwn b/hurd/debugging/hurd.mdwn deleted file mode 100644 index 043da3e0..00000000 --- a/hurd/debugging/hurd.mdwn +++ /dev/null @@ -1,53 +0,0 @@ -[[meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] - -[[meta license="""[[toggle id="license" text="GFDL 1.2+"]][[toggleable -id="license" text="Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled -[[GNU_Free_Documentation_License|/fdl]]."]]"""]] - -Say you want to try running file system server (*[[translator/ext2fs]]*, -*[[translator/jfs]]*, ...) against a modified version of *[[libpager]]* and -debug the latter one using [[GDB]]. - -Set the [[translator]] like this: - - $ settrans -fgap ↩ - jfs.img.i ↩ - /usr/bin/env ↩ - LD_LIBRARY_PATH=~tschwinge/tmp/hurd/hurd.ogi/build/libpager ↩ - "`pwd`"/jfs.obj/jfs ↩ - "`pwd`"/jfs.img - -Then, when starting GDB, start it like this (or use an equivalent method, of -course): - - $ LD_LIBRARY_PATH=~tschwinge/tmp/hurd/hurd.ogi/build/libpager ↩ - gdb ↩ - ~tschwinge/tmp/jfs/jfs.obj/jfs 15436 - GNU gdb 6.5-debian - [...] - Reading symbols from /lib/libdiskfs.so.0.3...Reading symbols from /lib/debug/lib/libdiskfs.so.0.3...done. - done. - Loaded symbols for /lib/libdiskfs.so.0.3 - Reading symbols from /devel4/tschwinge/tmp/hurd/hurd.ogi/build/libpager/libpager.so.0.3...done. - Loaded symbols for /devel4/tschwinge/tmp/hurd/hurd.ogi/build/libpager/libpager.so.0.3 - Reading symbols from /lib/libstore.so.0.3...Reading symbols from /lib/debug/lib/libstore.so.0.3...done. - done. - Loaded symbols for /lib/libstore.so.0.3 - [...] - (gdb) break pager_demuxer - Breakpoint 1 at 0x105c98d: file ../../libpager/demuxer.c, line 27. - [...] - Breakpoint 1, pager_demuxer (inp=0x12bded0, outp=0x12bbec0) at ../../libpager/demuxer.c:27 - 27 { - (gdb) list - 22 /* Demultiplex a single message directed at a pager port; INP is the - 23 message received; fill OUTP with the reply. */ - 24 int - 25 pager_demuxer (mach_msg_header_t *inp, - [...] - -Voilà. diff --git a/hurd/debugging/translator.mdwn b/hurd/debugging/translator.mdwn new file mode 100644 index 00000000..22c8cc2c --- /dev/null +++ b/hurd/debugging/translator.mdwn @@ -0,0 +1,13 @@ +[[meta copyright="Copyright © 2008 Free Software Foundation, Inc."]] + +[[meta license="""[[toggle id="license" text="GFDL 1.2+"]][[toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU_Free_Documentation_License|/fdl]]."]]"""]] + +[[inline +pages="hurd/debugging/translator/* and !*/discussion" +show=0]] diff --git a/hurd/debugging/translator/gdb.mdwn b/hurd/debugging/translator/gdb.mdwn new file mode 100644 index 00000000..bee41010 --- /dev/null +++ b/hurd/debugging/translator/gdb.mdwn @@ -0,0 +1,53 @@ +[[meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] + +[[meta license="""[[toggle id="license" text="GFDL 1.2+"]][[toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU_Free_Documentation_License|/fdl]]."]]"""]] + +Say you want to try running file system server ([[`ext2fs`|translator/ext2fs]], +[[`jfs`|translator/jfs]], ...) against a modified version of +[[`libpager`|libpager]] and debug the latter one using [[debugging/GDB]]. + +Set the [[hurd/translator]] like this: + + $ settrans -fgap ↩ + jfs.img.i ↩ + /usr/bin/env ↩ + LD_LIBRARY_PATH=~tschwinge/tmp/hurd/hurd.ogi/build/libpager ↩ + "$PWD"/jfs.obj/jfs ↩ + "$PWD"/jfs.img + +Then, when starting GDB, start it like this (or use an equivalent method, of +course): + + $ LD_LIBRARY_PATH=~tschwinge/tmp/hurd/hurd.ogi/build/libpager ↩ + gdb ↩ + ~tschwinge/tmp/jfs/jfs.obj/jfs 15436 + GNU gdb 6.5-debian + [...] + Reading symbols from /lib/libdiskfs.so.0.3...Reading symbols from /lib/debug/lib/libdiskfs.so.0.3...done. + done. + Loaded symbols for /lib/libdiskfs.so.0.3 + Reading symbols from /devel4/tschwinge/tmp/hurd/hurd.ogi/build/libpager/libpager.so.0.3...done. + Loaded symbols for /devel4/tschwinge/tmp/hurd/hurd.ogi/build/libpager/libpager.so.0.3 + Reading symbols from /lib/libstore.so.0.3...Reading symbols from /lib/debug/lib/libstore.so.0.3...done. + done. + Loaded symbols for /lib/libstore.so.0.3 + [...] + (gdb) break pager_demuxer + Breakpoint 1 at 0x105c98d: file ../../libpager/demuxer.c, line 27. + [...] + Breakpoint 1, pager_demuxer (inp=0x12bded0, outp=0x12bbec0) at ../../libpager/demuxer.c:27 + 27 { + (gdb) list + 22 /* Demultiplex a single message directed at a pager port; INP is the + 23 message received; fill OUTP with the reply. */ + 24 int + 25 pager_demuxer (mach_msg_header_t *inp, + [...] + +Voilà. diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index 1a987b09..d333da5a 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -42,6 +42,9 @@ See some [[examples]] about how to use translators. Marcus Brinkmann has written a document about [[documentation/translators]]. +Here are some [[hints_about_debugging_translators|debugging/translator]] +available. + # Existing Translators -- cgit v1.2.3 From ad75cac5b15615e206c601ca21cc65618f357b49 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 20 Nov 2008 22:50:42 +0100 Subject: About capturing a translator's stdout and stderr. --- .../translator/capturing_stdout_and_stderr.mdwn | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 hurd/debugging/translator/capturing_stdout_and_stderr.mdwn (limited to 'hurd/debugging') diff --git a/hurd/debugging/translator/capturing_stdout_and_stderr.mdwn b/hurd/debugging/translator/capturing_stdout_and_stderr.mdwn new file mode 100644 index 00000000..8430287a --- /dev/null +++ b/hurd/debugging/translator/capturing_stdout_and_stderr.mdwn @@ -0,0 +1,26 @@ +[[meta copyright="Copyright © 2008 Free Software Foundation, Inc."]] + +[[meta license="""[[toggle id="license" text="GFDL 1.2+"]][[toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU_Free_Documentation_License|/fdl]]."]]"""]] + +Sometimes it may already be helpful to capture a translator's `stdout` and +`stderr`, for example like this: + + $ sudo settrans -fgap ↩ + /servers/socket/2 ↩ + /bin/sh -c '/hurd/pfinet -i eth0 -a [...] > /tmp/stdout 2> /tmp/stderr' + $ [...] + $ cat /tmp/stdout + NET4: Linux TCP/IP 1.0 for NET4.0 + IP Protocols: ICMP, UDP, TCP + TCP: Hash tables configured (ehash 65536 bhash 65536) + $ cat /tmp/stderr + pfinet: ../../hurd.work/pfinet/ethernet.c:196: ethernet_xmit: Unexpected error: (os/device) invalid IO size. + +(Trying to run [[GDB]] in this case was of no help -- due to a bug in GDB +(supposedly) it wouldn't catch the fault.) -- cgit v1.2.3 From 7a67fff454fddda32c4ce789cde8449ec9a88f52 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sat, 22 Nov 2008 23:56:16 +0100 Subject: Tidy inline directives. --- hurd/debugging/translator.mdwn | 4 +++- hurd/faq.mdwn | 1 + hurd/open_issues.mdwn | 1 + hurd/running/debian/faq.mdwn | 1 + hurd/running/debian/porting.mdwn | 1 + hurd/translator/tmpfs.mdwn | 4 ++-- index.mdwn | 7 +++++++ microkernel/faq.mdwn | 1 + microkernel/mach/gnumach/open_issues.mdwn | 1 + microkernel/mach/mig/gnu_mig/open_issues.mdwn | 1 + news.mdwn | 1 + 11 files changed, 20 insertions(+), 3 deletions(-) (limited to 'hurd/debugging') diff --git a/hurd/debugging/translator.mdwn b/hurd/debugging/translator.mdwn index 22c8cc2c..8e8dd6fb 100644 --- a/hurd/debugging/translator.mdwn +++ b/hurd/debugging/translator.mdwn @@ -10,4 +10,6 @@ is included in the section entitled [[inline pages="hurd/debugging/translator/* and !*/discussion" -show=0]] +show=0 +feeds=no +actions=yes]] diff --git a/hurd/faq.mdwn b/hurd/faq.mdwn index aab538d9..0227f1c1 100644 --- a/hurd/faq.mdwn +++ b/hurd/faq.mdwn @@ -13,5 +13,6 @@ is included in the section entitled [[inline pages="hurd/faq/* and !*/discussion" show=0 +feeds=no actions=yes rootpage="hurd/faq" postformtext="Add a new item titled:"]] diff --git a/hurd/open_issues.mdwn b/hurd/open_issues.mdwn index d7dc4d99..c4bcce09 100644 --- a/hurd/open_issues.mdwn +++ b/hurd/open_issues.mdwn @@ -15,5 +15,6 @@ This is a dumping ground for open issues for the GNU Hurd. [[inline pages="hurd/open_issues/* and !*/discussion" show=0 +feeds=no actions=yes rootpage="hurd/open_issues" postformtext="Add a new item titled:"]] diff --git a/hurd/running/debian/faq.mdwn b/hurd/running/debian/faq.mdwn index f4b607bf..227ade02 100644 --- a/hurd/running/debian/faq.mdwn +++ b/hurd/running/debian/faq.mdwn @@ -15,5 +15,6 @@ See also the [[Hurd_FAQ|hurd/FAQ]] and [[after_install]]. [[inline pages="hurd/running/debian/faq/* and !*/discussion" show=0 +feeds=no actions=yes rootpage="hurd/running/debian/faq" postformtext="Add a new item titled:"]] diff --git a/hurd/running/debian/porting.mdwn b/hurd/running/debian/porting.mdwn index 7ca91d37..eb46c4c3 100644 --- a/hurd/running/debian/porting.mdwn +++ b/hurd/running/debian/porting.mdwn @@ -33,5 +33,6 @@ guidelines. [[inline pages="hurd/running/debian/porting/* and !*/discussion" show=0 +feeds=no actions=yes rootpage="hurd/running/debian/porting" postformtext="Add a new item titled:"]] diff --git a/hurd/translator/tmpfs.mdwn b/hurd/translator/tmpfs.mdwn index 6d10c163..bb9ef269 100644 --- a/hurd/translator/tmpfs.mdwn +++ b/hurd/translator/tmpfs.mdwn @@ -18,5 +18,5 @@ It's not working correctly at the moment. [[inline pages="hurd/translator/tmpfs/*" show=0 -actions=yes -rootpage="hurd/translator/tmpfs" postformtext="Add a new item titled:"]] +feeds=no +actions=yes]] diff --git a/index.mdwn b/index.mdwn index 3103f8f7..8754baab 100644 --- a/index.mdwn +++ b/index.mdwn @@ -23,9 +23,16 @@ kernels (such as Linux). *[[More_detailed.|hurd/what_is_the_gnu_hurd]]* ## News +[[inline +pages="news/* and !*/discussion" +feedonly=yes +feedshow=10 +sort=title +reverse=yes]] [[inline pages="news/* and !*/discussion" show=5 +feeds=no sort=title reverse=yes template=newsitem diff --git a/microkernel/faq.mdwn b/microkernel/faq.mdwn index 0e129095..f83c65ca 100644 --- a/microkernel/faq.mdwn +++ b/microkernel/faq.mdwn @@ -13,5 +13,6 @@ is included in the section entitled [[inline pages="microkernel/faq/* and !*/discussion" show=0 +feeds=no actions=yes rootpage=microkernel/faq" postformtext="Add a new item titled:"]] diff --git a/microkernel/mach/gnumach/open_issues.mdwn b/microkernel/mach/gnumach/open_issues.mdwn index 433ec3ef..ec289708 100644 --- a/microkernel/mach/gnumach/open_issues.mdwn +++ b/microkernel/mach/gnumach/open_issues.mdwn @@ -15,5 +15,6 @@ This is a dumping ground for open issues for GNU Mach. [[inline pages="microkernel/mach/gnumach/open_issues/* and !*/discussion" show=0 +feeds=no actions=yes rootpage="microkernel/mach/gnumach/open_issues" postformtext="Add a new item titled:"]] diff --git a/microkernel/mach/mig/gnu_mig/open_issues.mdwn b/microkernel/mach/mig/gnu_mig/open_issues.mdwn index 7a6233da..225f9cfc 100644 --- a/microkernel/mach/mig/gnu_mig/open_issues.mdwn +++ b/microkernel/mach/mig/gnu_mig/open_issues.mdwn @@ -15,6 +15,7 @@ This is a dumping ground for open issues for GNU MIG. [[inline pages="microkernel/mach/mig/gnu_mig/open_issues/* and !*/discussion" show=0 +feeds=no actions=yes rootpage="microkernel/mach/mig/gnu_mig/open_issues" postformtext="Add a new item titled:"]] diff --git a/news.mdwn b/news.mdwn index 71058f85..8e5d73da 100644 --- a/news.mdwn +++ b/news.mdwn @@ -11,6 +11,7 @@ is included in the section entitled [[inline pages="news/* and !*/discussion" show=0 +feeds=no sort=title reverse=yes actions=yes]] -- cgit v1.2.3 From 0e532fa981a9b1ad8e1165dfe4375fbb9fca95e3 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 26 Nov 2008 00:22:28 +0100 Subject: Incorporate and further improvements. --- hurd/debugging/glibc.mdwn | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) (limited to 'hurd/debugging') diff --git a/hurd/debugging/glibc.mdwn b/hurd/debugging/glibc.mdwn index f0fe8b61..54a3446c 100644 --- a/hurd/debugging/glibc.mdwn +++ b/hurd/debugging/glibc.mdwn @@ -13,11 +13,11 @@ glibc have been done. --- -First step is having the build a glibc complete. This is actually more -difficult than one might expect, as it involves (towards the end of the build -process; unless you are cross-building, of course), that the newly created -libraries and loader actually work: they're used to run the `rpcgen` -program. If that step doesn't succeed, it'll look similar to this: +First step is having the build of glibc succeed. This is actually more +difficult than one might expect as it involves (towards the end of the build +process -- unless you are [[building/cross-compiling]], of course -- that the +newly created libraries and loader actually work: they'll be used to run the +`rpcgen` program. If that step doesn't succeed, it'll look similar to this: [...] CPP='gcc -E -x c-header' [...]/build/elf/ld.so.1 --library-path [...] [...]/build/sunrpc/rpcgen [...] @@ -25,8 +25,8 @@ program. If that step doesn't succeed, it'll look similar to this: --- -If building glibc succeeds, the next thing to try is running the test suite, or -parts of it. +Unless [[building/cross-compiling]], the next thing you'll probably want to do +is running the test suite, or parts of it. Here is a list of known failures: @@ -34,10 +34,28 @@ Here is a list of known failures: --- -Make sure static linking is working OK at all. The `elf/sln` program (a -stripped-down `ln` that is statically linked) in the glibc build ought to test -that. Also, static linking under various conditions will already have been -tested when running the test suite, especially in `elf/` and `dlfcn/`. +If you've been doing simple changes to glibc functions that end up in +`libc.so`, you may test them like this (like for a `strerror_l` implementation +in this case): + + $ LD_PRELOAD=./libc.so ./ld.so ./a.out 10 1073741928 de_DE.utf8 + 1073741928 (0x40000068): Computer bought the farm + 1073741928 (0x40000068): Der Computer hat den Bauernhof erworben + +You usually will only have luck using the new `libc.so` (from +`[glibc-build]/libc.so`) in combination together with the new `ld.so` (from +`[glibc-build]/elf/ld.so`): + + $ LD_PRELOAD=./libc.so ./a.out 10 1073741928 de_DE.utf8 + Killed + $ LD_PRELOAD=./libc.so /lib/ld.so ./a.out 10 1073741928 de_DE.utf8 + Killed + +Make sure static linking is working OK at all. Running the +`[glibc-build]/elf/sln` program (a stripped-down `ln` that is statically +linked) ought to test that. Also, static linking under various conditions will +already have been tested when running the test suite, especially in `elf/` and +`dlfcn/`. Make sure static linking with cthreads is working. If you can get an `ext2fs.static` compiled and linked against the new glibc, that is good. @@ -51,8 +69,8 @@ Then debug its startup as a normal program on your working hurd. Then try its full server startup. - $ settrans -ca node [...]/ext2fs.static - $ cd node/ + $ settrans -ca node [...]/ext2fs.static BACKING_STORE + $ ls -l node/ [...] Make sure dynamic linking for servers is working. If you haven't broken the @@ -61,7 +79,7 @@ glibc's `testrun.sh` does it. [TODO]: Is this the correct way to do that? - $ settrans -ca node [glibc]/build/testrun.sh /hurd/ext2fs + $ settrans -ca node [glibc]/build/testrun.sh /hurd/ext2fs BACKING_STORE $ cd node/ [...] -- cgit v1.2.3 From 1ef24b38c7bc9952bbeba13d997eeec11154d3a4 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 26 Nov 2008 00:22:49 +0100 Subject: Remove sources, as they're in the RCS history. --- hurd/debugging/glibc.mdwn | 7 ------- 1 file changed, 7 deletions(-) (limited to 'hurd/debugging') diff --git a/hurd/debugging/glibc.mdwn b/hurd/debugging/glibc.mdwn index 54a3446c..912f656c 100644 --- a/hurd/debugging/glibc.mdwn +++ b/hurd/debugging/glibc.mdwn @@ -90,10 +90,3 @@ Test it in a [[subhurd]]. --- Test it on a real system. - ---- - -Sources: - -* -* [[Thomas_Schwinge|tschwinge]]'s mind -- cgit v1.2.3