summaryrefslogtreecommitdiff
path: root/open_issues/gdb.mdwn
blob: 1652031b39d55f429fbf712650cc25e120046d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
[[!meta copyright="Copyright © 2007, 2008, 2010, 2011, 2012 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]]."]]"""]]

[[!tag open_issue_gdb]]

Here's what's to be done for maintaining GNU GDB.

[[!toc levels=2]]


# [[General information|/gdb]]


# [[Sources|source_repositories/gdb]]


# Configuration

Last reviewed up to the [[Git mirror's ea9812279fe436be9a010d07ef1dbe465199a3d7
(2011-09-07) sources|source_repositories/gdb]].

  * Globally

      * a.out, COFF, PE image support and 64 bit support are not interesting.

      * In the testsuites, `.exp` and `.d` files very likely should not only
        care for `*-*-linux*`, but also `*-*-gnu*`.  (If the need to be
        conditionalized like this at all.)

  * `bfd/`

    See [[binutils]].

  * `libdecnumber/`

    Should/can probably align to GNU/Linux.

  * Have a look at config/i386/i386gnu.mh.

  * configure.tgt

      * glibc-tdep et al. also for GNU/Hurd?

  * [[gdbserver]]


# Build

Here's a log of a GDB build run; this is from our [[Git repository's
695f61ff0f378e1680964128585044799de27015 (2011-09-06)
sources|source_repositories/gdb]], run on kepler.SCHWINGE and coulomb.SCHWINGE.

    $ export LC_ALL=C
    $ ../master/configure --prefix="$PWD".install SHELL=/bin/dash CC=gcc-4.6 CXX=g++-4.6 --disable-werror 2>&1 | tee log_build
    [...]
    $ make 2>&1 | tee log_build_
    [...]

Different hosts may default to different shells and compiler versions; thus
harmonized.

There are several occurences of *error: dereferencing type-punned pointer will
break strict-aliasing rules* in the MIG-generated stub files; thus no `-Werror`
until that is resolved ([[strict_aliasing]]).

This takes up around 140 MiB and needs roughly 6 min on kepler.SCHWINGE and 30
min on coulomb.SCHWINGE.


## Analysis

x86 GNU/Linux' and GNU/Hurd's configurations are slightly different, thus mask
out most of the differences that are due to GNU/Linux supporting more core file
formats and more emulation vectors.

    $ ssh kepler.SCHWINGE 'cd tmp/source/gdb/ && cat hurd/master.build/log_build* | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > toolchain/logs/gdb/linux/log_build
    $ ssh coulomb.SCHWINGE 'cd tmp/gdb/ && cat hurd/master.build/log_build* | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > toolchain/logs/gdb/hurd/log_build
    $ diff -wu <(sed -f toolchain/logs/gdb/linux/log_build.sed < toolchain/logs/gdb/linux/log_build) <(sed -f toolchain/logs/gdb/hurd/log_build.sed < toolchain/logs/gdb/hurd/log_build) > toolchain/logs/gdb/log_build.diff

  * Why do we specify `-D_GNU_SOURCE`, and GNU/Linux doesn't?

  * Why does GNU/Linux have an additional `-ldl -rdynamic` when linking `gdb`?


# Install

    $ make install 2>&1 | tee log_install
    [...]

This takes up around 50 MiB, and needs roughly 1 min on kepler.SCHWINGE and 3
min on coulomb.SCHWINGE.


## Analysis

    $ ssh kepler.SCHWINGE 'cd tmp/source/gdb/ && cat hurd/master.build/log_install | sed -e "s%\(/media/data\)\?${PWD}%[...]%g"' > toolchain/logs/gdb/linux/log_install
    $ ssh coulomb.SCHWINGE 'cd tmp/gdb/ && cat hurd/master.build/log_install | sed -e "s%\(/media/erich\)\?${PWD}%[...]%g"' > toolchain/logs/gdb/hurd/log_install
    $ diff -wu <(sed -f toolchain/logs/gdb/linux/log_install.sed < toolchain/logs/gdb/linux/log_install) <(sed -f toolchain/logs/gdb/hurd/log_install.sed < toolchain/logs/gdb/hurd/log_install) > toolchain/logs/gdb/log_install.diff

  * `libtool: finish`: `ldconfig` is not run for the Hurd.


# Testsuite

On GNU/Hurd, hampered by the [[term_blocking]] issue.

    $ make -k check
    [...]

This needs roughly 45 min on kepler.SCHWINGE and TODO min on coulomb.SCHWINGE.

    $ ssh kepler.SCHWINGE 'cd tmp/source/gdb/ && sed -e "s%\(/media/data\)\?${PWD}%[...]%g" < hurd/master.build/gdb/testsuite/gdb.sum' > toolchain/logs/gdb/linux/sum
    $ ssh coulomb.SCHWINGE 'cd tmp/gdb/ && sed -e "s%\(/media/erich\)\?${PWD}%[...]%g" < hurd/master.build/gdb/testsuite/gdb.sum' > toolchain/logs/gdb/hurd/sum
    $ diff -u -F ^Running toolchain/logs/gdb/linux/sum toolchain/logs/gdb/hurd/sum > toolchain/logs/gdb/sum.diff


## Analysis

TODO.