geda-developers team mailing list archive
-
geda-developers team
-
Mailing list archive
-
Message #00018
Wrong source information in GDB while debugging libgeda.so
All,
I have encountered a strange problem and am looking for advice. While
trying to debug the changes on "pin-cues" branch I have found that
some of the source information provided by gdb is incorrect.
I'm running gschem via:
$ libtool --mode=execute gdb gschem/src/gschem
gdb> run
Then after libgeda.so is loaded I interrupt the execution and examine
the source in o_net_basic.c:
(gdb) l o_net_read
143 * \return The object list
144 *
145 */
146 OBJECT *o_net_read (TOPLEVEL *toplevel, char buf[],
147 unsigned int release_ver, unsigned int fileformat_ver)
148 {
149 OBJECT *new_obj;
150 char type;
151 int x1, y1;
152 int x2, y2;
(gdb) l o_net_save
161 type, x1, y1, x2, y2, color);
162 }
163
164 /* random comment 2 */
165
166 if (toplevel->override_net_color != -1) {
167 color = toplevel->override_net_color;
168 }
169
170 if (color < 0 || color > MAX_COLORS) {
(gdb) l o_net_translate_world
161 type, x1, y1, x2, y2, color);
162 }
163
164 /* random comment 2 */
165
166 if (toplevel->override_net_color != -1) {
167 color = toplevel->override_net_color;
168 }
169
170 if (color < 0 || color > MAX_COLORS) {
Somehow the source location is correct for some symbols, but incorrect
for others. The "random comments" were added to see if the locations
change on recompile - and they do.
I have also checked with installed copies of gschem/libgeda removed or
installed at the debugged version. No changes here.
System info:
$ gdb --version | head -n 1
GNU gdb 6.8-debian
$ gcc --version | head -n 1
gcc (Debian 4.5.3-3) 4.5.3
$ libtool --version
ltmain.sh (GNU libtool) 1.5.26 Debian 1.5.26-4 (1.1220.2.493 2008/02/01 16:58:18)
Any ideas would be appreciated.
Best regards,
Krzysztof Kościuszkiewicz