Try gdb-7.3 ?
- Code: Select all
-rw-r--r-- 1 9207 2010-03-19 04:00 gdb_distfiles/gdb-7.1-patches-1.tar.lzma
-rw-r--r-- 1 17977195 2010-03-18 22:27 gdb_distfiles/gdb-7.1.tar.bz2
-rw-rw-r-- 1 17344 2011-12-08 06:56 gdb_distfiles/gdb-7.3.1-patches-2.tar.xz
-rw-r--r-- 1 19500995 2011-09-04 20:30 gdb_distfiles/gdb-7.3.1.tar.bz2
It's less ancient...
/etc/portage/package.mask now:
- Code: Select all
>sys-devel/gdb-7.3.1-r2
And:
- Code: Select all
# emerge -1 gdb
These are the packages that would be merged, in order:
Calculating dependencies ... done!
[ebuild R ] sys-devel/gdb-7.1-r3::miro USE="client zlib -expat -multitarget -nls -python -server {-test} -vanilla" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No]
and it is now building.
============== SCRAPPED FOR NOW ============
I wasn't able to compile 7.3. But very little tweak I believe is missing. And gdb-7.3 might be needed yet... So leaving the above.
7.4 easily compiles. Similar procedure and similar tweaks as before of the package.mask, and by the time I post this, I'll try and make all (my clumsy) sources, ebuilds and (primitive) patches available at
http://www.CroatiaFidelis.hr/foss/grsec/gdb/ somewhere...
Let's see if it's any worth. I'm back at using that command I posted two or so posts ago:
- Code: Select all
gdb CU_112_string |& tee \
gdb_CU_112_string_$(date +%y%m%d_%H%M)_$(hostname).log
I got:
- Code: Select all
GNU gdb (Gentoo 7.4.1 p3) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /Cmn/mr_C/CU_112_string...done.
(gdb) b CU_112_string.c:3
Breakpoint 1 at 0x849: file CU_112_string.c, line 3.
(gdb) r
Starting program: /Cmn/mr_C/CU_112_string
/bin/bash: /Cmn/mr_C/CU_112_string: Permission denied
/bin/bash: /Cmn/mr_C/CU_112_string: Success
During startup program exited with code 126.
(gdb) kill
The program is not being run.
(gdb) q
, but that is of course because gradm has been enabled in the meantime.
Disabling it, as well as the harden_ptrace, ptrace_readexec, tpe and
tpe_restrict_all.
Now, plain running of it:
- Code: Select all
GNU gdb (Gentoo 7.4.1 p3) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /Cmn/mr_C/CU_112_string...done.
(gdb) r
Starting program: /Cmn/mr_C/CU_112_string
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x3ce6c5e5000
Grüße!
[Inferior 1 (process 12950) exited normally]
(gdb) q
, shows it can run the program, but the error is ugly.
Listing the program source and setting a break now:
- Code: Select all
GNU gdb (Gentoo 7.4.1 p3) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /Cmn/mr_C/CU_112_string...done.
(gdb) l
1 #include<stdio.h>
2
3 int main()
4 {
5 char *ptr_my;
6 ptr_my = "Grüße!";
7 printf("%s\n", ptr_my);
8
9 return 0;
10 }
(gdb) b CU_112_string.c:3
Breakpoint 1 at 0x849: file CU_112_string.c, line 3.
(gdb) r
Starting program: /Cmn/mr_C/CU_112_string
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x3a857318000
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x55fe811849: Input/output error.
Cannot insert breakpoint -1.
Temporarily disabling shared library breakpoints:
breakpoint #-1
(gdb) s
Cannot find bounds of current function
(gdb)
Cannot find bounds of current function
(gdb) k
Kill the program being debugged? (y or n) (gdb) q
I left the unsuccessful attempt to install 7.3 further above, because I applied the same amateur-style attempt at fixing it which worked for 7.4.
I'm talking about they both fail when they install texinfo pages. I could do without those (by reading them from elsewhere), but my knowledge is insufficient to edit the Makefile's and stuff and install without those. And so I used an entire direcory from 7.5 and replaced it into 7.3 (but a minor hurdle remained) and into 7.4, which worked.
I am talking about unpacking the 7.5 archive and also 7.3 (applies for 7.4 as well) archive and doing simply:
- Code: Select all
cp -iav gdb-7.5.1/gdb/doc/* gdb-7.3.1/gdb/doc/
and then packaging it as gdb-7.3.1.tar.gz and changing in the ebuild just the '.bz2' into '.gz'.
I'll post the plaintext (color-codes I blanked out) portage logs:
- Code: Select all
-rw-rw---- 1 portage portage 358177 2016-07-30 14:55 sys-devel:gdb-7.3.1-r3:20160730-120503.log
-rw-rw---- 1 portage portage 368128 2016-07-30 15:39 sys-devel:gdb-7.4.1-r3:20160730-130233.log
and regardless of not speaking automake I'll try and see how to fix the little one small problem that remains there.
In shorter terms than perusing those two logs, here are excerpts.
The 7.4 up to the completion of the build process (shortened where possible):
- Code: Select all
cp ./all-cfg.texi gdb-cfg.texi
echo "@set GDBVN `sed q ./../version.in`" > ./GDBvn.new
if [ -n "(Gentoo 7.4.1 p3) " ]; then \
echo "@set VERSION_PACKAGE (Gentoo 7.4.1 p3) " >> ./GDBvn.new; \
fi
echo "@set BUGURL @uref{http://bugs.gentoo.org/}" >> ./GDBvn.new
if [ "@uref{http://bugs.gentoo.org/}" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \
echo "@set BUGURL_DEFAULT" >> ./GDBvn.new; \
fi
if test -z ""; then \
echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
fi
mv GDBvn.new GDBvn.texi
makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I ./../mi -I . \
-o gdb.info ./gdb.texinfo
makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I . -o gdbint.info ./gdbint.texinfo
makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I . -o annotate.info ./annotate.texinfo
./gdb.texinfo:31: warning: @syncodeindex leads to a merging of fn in itself, ignoring
./gdb.texinfo:23002: warning: @table has text but no @item
./gdb.texinfo:23054: warning: @table has text but no @item
./gdb.texinfo:23310: warning: @table has text but no @item
...[ 18 similar lines cut here ]...
./gdb.texinfo:25356: warning: @table has text but no @item
./gdb.texinfo:25369: warning: @table has text but no @item
./gdb.texinfo:35432: warning: @item missing argument
./gdb.texinfo:35602: warning: @item missing argument
...[ 20 similar lines cut here ]...
./gdb.texinfo:37753: warning: @item missing argument
./gdb.texinfo:37890: warning: @item missing argument
./gdb.texinfo:33701: warning: node next `GDB Bugs' in menu `(rluserman)' and in sectioning `In Memoriam' differ
./gdb.texinfo:33954: warning: node prev `In Memoriam' in menu `(history)' and in sectioning `GDB Bugs' differ
./gdb.texinfo:1919: warning: @xref node name should not contain `.'
./gdb.texinfo:16452: warning: @ref node name should not contain `.'
/bin/sh ./../../mkinstalldirs /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info
/usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 ./gdb.info /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/gdb.info
/usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 ./gdb.info-1 /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/gdb.info-1
...
/usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 ./gdbint.info /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/gdbint.info
...
/usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 ./stabs.info /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/stabs.info
/usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 ./annotate.info /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/annotate.info
install-info --info-dir=/var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/gdb.info
install-info --info-dir=/var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/gdbint.info
install-info --info-dir=/var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/stabs.info
install-info --info-dir=/var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/info/annotate.info
make[5]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb/doc'
make[5]: Entering directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb/testsuite'
make[5]: Nothing to be done for 'install'.
make[5]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb/testsuite'
make[5]: Entering directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb/data-directory'
make[6]: Entering directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb/data-directory'
/bin/sh ./../../mkinstalldirs /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/gdb/syscalls
files='gdb/__init__.py gdb/types.py gdb/printing.py gdb/prompt.py gdb/command/__init__.py gdb/command/pretty_printers.py gdb/command/prompt.py' ; \
for file in $files ; do \
dir=`echo "$file" | sed 's,/[^/]*$,,'` ; \
/bin/sh ./../../mkinstalldirs /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/gdb/python/$dir ; \
/usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 ./python/$file /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/gdb/python/$dir ; \
done
mkdir -p -- /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/gdb/syscalls
files='gdb-syscalls.dtd ppc-linux.xml ppc64-linux.xml i386-linux.xml amd64-linux.xml sparc-linux.xml sparc64-linux.xml mips-o32-linux.xml mips-n32-linux.xml mips-n64-linux.xml' ; \
for file in $files; do \
f=./../syscalls/$file ; \
if test -f $f ; then \
/usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 $f /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/gdb/syscalls ; \
fi ; \
done
mkdir -p -- /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/gdb/python/gdb
mkdir -p -- /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image//usr/share/gdb/python/gdb/command
make[6]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb/data-directory'
make[5]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb/data-directory'
make[4]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb'
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb'
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1/gdb'
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.4.1-r3/work/gdb-7.4.1'
>>> Completed installing gdb-7.4.1-r3 into /var/tmp/portage/sys-devel/gdb-7.4.1-r3/image/
* Final size of build directory: 214832 KiB
* Final size of installed tree: 17072 KiB
And the 7.3 (the failing one to build) from about the same place:
- Code: Select all
cp ./all-cfg.texi gdb-cfg.texi
echo "@set GDBVN `sed q ./../version.in`" > ./GDBvn.new
if [ -n "(Gentoo 7.3.1 p2) " ]; then \
echo "@set VERSION_PACKAGE (Gentoo 7.3.1 p2) " >> ./GDBvn.new; \
fi
echo "@set BUGURL @uref{http://bugs.gentoo.org/}" >> ./GDBvn.new
if [ "@uref{http://bugs.gentoo.org/}" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \
echo "@set BUGURL_DEFAULT" >> ./GDBvn.new; \
fi
if test -z ""; then \
echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \
fi
mv GDBvn.new GDBvn.texi
makeinfo --split-size=5000000 --split-size=5000000 @MAKEINFOFLAGS@ @MAKEINFO_EXTRA_FLAGS@ -I ./../mi -I . \
-o gdb.info ./gdb.texinfo
makeinfo --split-size=5000000 --split-size=5000000 @MAKEINFOFLAGS@ @MAKEINFO_EXTRA_FLAGS@ -I . -o gdbint.info ./gdbint.texinfo
makeinfo --split-size=5000000 --split-size=5000000 @MAKEINFOFLAGS@ @MAKEINFO_EXTRA_FLAGS@ -I . -o annotate.info ./annotate.texinfo
could not open @MAKEINFOFLAGS@: No such file or directory
could not open @MAKEINFOFLAGS@: No such file or directory
make[5]: *** [Makefile:522: annotate.info] Error 1
make[5]: *** Waiting for unfinished jobs....
could not open @MAKEINFOFLAGS@: No such file or directory
make[5]: *** [Makefile:470: gdbint.info] Error 1
make[5]: *** [Makefile:371: gdb.info] Error 1
make[5]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.3.1-r3/work/gdb-7.3.1/gdb/doc'
make[4]: *** [Makefile:1288: subdir_do] Error 1
make[4]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.3.1-r3/work/gdb-7.3.1/gdb'
make[3]: *** [Makefile:1018: install-only] Error 2
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.3.1-r3/work/gdb-7.3.1/gdb'
make[2]: *** [Makefile:1014: install] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.3.1-r3/work/gdb-7.3.1/gdb'
make[1]: *** [Makefile:11427: install-gdb] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gdb-7.3.1-r3/work/gdb-7.3.1'
make: *** [Makefile:2676: install] Error 2
emake failed
* ERROR: sys-devel/gdb-7.3.1-r3::miro failed (install phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 115: Called src_install
* environment, line 2338: Called die
* The specific snippet of code:
* emake DESTDIR="${D}" install || die;
*
* If you need support, post the output of `emerge --info '=sys-devel/gdb-7.3.1-r3::miro'`,
* the complete build log and the output of `emerge -pqv '=sys-devel/gdb-7.3.1-r3::miro'`.
* !!! User patches were applied to this build!
It appears to me that sorting only this issue here:
The 7.4 is OK:
- Code: Select all
...
makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I ./../mi -I . \
-o gdb.info ./gdb.texinfo
makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I . -o gdbint.info ./gdbint.texinfo
makeinfo --split-size=5000000 --split-size=5000000 -DHAVE_MAKEINFO_CLICK -I . -o annotate.info ./annotate.texinfo
...
The 7.3 fails to make the necessary substitution here:
- Code: Select all
...
makeinfo --split-size=5000000 --split-size=5000000 @MAKEINFOFLAGS@ @MAKEINFO_EXTRA_FLAGS@ -I ./../mi -I . \
-o gdb.info ./gdb.texinfo
makeinfo --split-size=5000000 --split-size=5000000 @MAKEINFOFLAGS@ @MAKEINFO_EXTRA_FLAGS@ -I . -o gdbint.info ./gdbint.texinfo
makeinfo --split-size=5000000 --split-size=5000000 @MAKEINFOFLAGS@ @MAKEINFO_EXTRA_FLAGS@ -I . -o annotate.info ./annotate.texinfo
could not open @MAKEINFOFLAGS@: No such file or directory
could not open @MAKEINFOFLAGS@: No such file or directory
make[5]: *** [Makefile:522: annotate.info] Error 1
make[5]: *** Waiting for unfinished jobs....
could not open @MAKEINFOFLAGS@: No such file or directory
...
should get the 7.3 to build and then install.
But I was only able to pinpoint where I lack understanding yet to fix the problem...
---
I'll just try and point a few more of my pondering over the issues I deployed in this topic...
Probably because of the lack of any desire on the part of GNU Debugger team to let the user have PaX protection in their kernel and for them to adapt their program to work with such grsecurity-hardeneed kernel (grsecurity being in some way a twin program, the PaX set of patches to the kernel and the grsecurity proper set of patches to the kernel)...
In the next post I'll try and deploy/propose a few more of my thoughts.