RE: [PATCH v2] Remove duplicated include in gdb directory

Honggyu Kim
2014-01-06T05:13:08Z

Thank you for your kind feedback.
I thought it's just a minor code cleanup so I didn't expect any copyright issues.

I have tried to build as below.
$ ./configure --prefix=`pwd`/build
$ make
and
$ make distclean
$ ./configure --prefix=`pwd`/build --enable-targets=all
$ make

In both cases, build were fine and gdb binary is generated without problems.

However, when I tried to run gdb to debug just a simple hello world program, it fails.
But I found that the current HEAD also fails by showing the following message.
It seems to be very strange for me since it's not from the patch that I submitted.
I have tested the same thing after checkout a tag "gdb_7_6_2-2013-12-08-release" and it worked fine.
Please consider this issue separately or please correct me if I'm wrong.

$ cd build/bin/
$ ./gdb ./a.out
GNU gdb (GDB) 7.6.50.20140106-cvs
Copyright (C) 2014 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-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./a.out...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/hong.gyu.kim/src/gdb/binutils-gdb/build/bin/a.out
*** glibc detected *** ./gdb: double free or corruption (out): 0x0000000003435860 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7fc88175db96]
./gdb[0x86b8a1]
./gdb(bfd_close+0x82)[0x86be52]
...
Aborted (core dumped)
Hello, World

-----Original Message-----
From: Sergio Durigan Junior [mailto:sergiodj@redhat.com]
Sent: Monday, January 06, 2014 12:47 PM
To: Honggyu Kim
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Remove duplicated include in gdb directory

On Sunday, January 05 2014, Honggyu Kim wrote:

> This patch simply removes duplicated include statements in gdb directory.
> If there are two duplicated include statements, this patch keeps the first
> include and removes the second include.
> Those are found by checkincludes.pl tool in linux kernel and double checked
> manually once again if the include statements are affected by ifdef macro.

Thanks for the patch, Honggyu. I believe you have tested it by building
GDB with --enable-targets=all, right?

It needs a ChangeLog (mechanical), and it seems to be simple enough to
be committed without needing a copyright assignment (I don't see your
name in the MAINTAINERS file).

Other than that, let's wait for some maintainer to give the green
light. BTW, if you want to get started on the process to obtain the
copyright assignment, mail me offlist and I can send you the
instructions.

Thanks,

--
Sergio