LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 01-27-2014, 03:34 AM   #1
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,851
Blog Entries: 1

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
AIX - gdb - command "info sh" stopped working between 7.4.1 and 7.5


I have compiled a few versions of gdb to find out when command "info sh" stopped working.

Test #1 with gdb-7.4.1
Code:
$ gdb-7.4.1 hello32
GNU gdb (GDB) 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 "powerpc-ibm-aix5.2.0.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/projects/proba/hello32...done.
(gdb) break main
Breakpoint 1 at 0x100003e4: file hello.c, line 7.
(gdb) run
Starting program: /home/projects/proba/hello32 

Breakpoint 1, main () at hello.c:7
7           printf ("Hello, world\n");
(gdb) info sh
Text Range              Data Range              Syms    Shared Object Library
0xd007b21c-0xd007b93e   0xf02d8508-0xf02d8630   Yes     /usr/lib/libcrypt.a(shr.o)
0xd01e6f60-0xd03e7681   0xf0241b20-0xf02d7d30   Yes     /usr/lib/libc.a(shr.o)
Test #2 with gdb-7.5
Code:
$ gdb-7.5 hello32
GNU gdb (GDB) 7.5
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 "powerpc-ibm-aix5.2.0.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/projects/proba/hello32...done.
(gdb) break main
Breakpoint 1 at 0x100003e4: file hello.c, line 7.
(gdb) run
Starting program: /home/projects/proba/hello32 

Breakpoint 1, main () at hello.c:7
7           printf ("Hello, world\n");
(gdb) info sh
No shared libraries loaded at this time.
So it works with 7.4.1, doesn't work with 7.5
Notes:
- it was the very same hello32 executable (compiled with gcc, linked with AIX ld)
- the same result with 64-bit version (-maix64)
- it does use shared lib: /usr/lib/libc.a(shr.o)
- both gdb version was compiled locally
- tested AIX versions: 5.2, 6.1

Last edited by NevemTeve; 01-27-2014 at 05:05 AM.
 
Old 01-28-2014, 05:57 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,851

Original Poster
Blog Entries: 1

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
file gdb-vvv/gdb/xcoffsolib.c might have something to do with the problem.

Code:
$ ls -l gdb*/gdb/xcoffsolib.c
-rw-rw-rw- 1     9176 65490 5052 Jan 12  2011 gdb-7.3.1/gdb/xcoffsolib.c
-rw-rw-rw- 1     9176 65490 5024 Jan  6  2012 gdb-7.4.1/gdb/xcoffsolib.c
-rw-rw-rw- 1     9176 65490 5061 Mar 12  2012 gdb-7.5/gdb/xcoffsolib.c
-rw-rw-rw- 1 projects ipsec 5028 Dec  8 05:33 gdb-7.6.2/gdb/xcoffsolib.c

Last edited by NevemTeve; 01-28-2014 at 06:38 AM.
 
Old 01-29-2014, 10:26 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,851

Original Poster
Blog Entries: 1

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
First result of examination:
both /gdb-7.5/gdb/solib.c:info_sharedlibrary_command and /gdb-7.5/gdb/xcoffsolib.c:solib_info implements command info sh, and (most likely) the former hides the latter.
 
Old 02-11-2014, 10:04 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,851

Original Poster
Blog Entries: 1

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
In gdb-7.6.2 it is solib.c:info_sharedlibrary_command function. Now I will try to comment this out and see what happens.

Edit: Here is the patch that makes "info sh" again:
Code:
--- solib.cold  2013-12-08 05:33:14 +0100
+++ solib.c     2014-02-11 17:01:38 +0100
@@ -946,6 +946,7 @@
    library matching PATTERN.  If PATTERN is elided, print them
    all.  */
 
+#ifndef _AIX
 static void
 info_sharedlibrary_command (char *pattern, int from_tty)
 {
@@ -1055,6 +1056,7 @@
                          "debugging information.\n"));
     }
 }
+#endif
 
 /* Return 1 if ADDRESS lies within SOLIB.  */
 
@@ -1457,8 +1459,10 @@
 
   add_com ("sharedlibrary", class_files, sharedlibrary_command,
           _("Load shared object library symbols for files matching REGEXP."));
+#ifndef _AIX
   add_info ("sharedlibrary", info_sharedlibrary_command,
            _("Status of loaded shared object libraries."));
+#endif
   add_com ("nosharedlibrary", class_files, no_shared_libraries,
           _("Unload all shared object library symbols."));
Edit: filed a bugreport: https://sourceware.org/bugzilla/show_bug.cgi?id=16556

Last edited by NevemTeve; 02-11-2014 at 10:59 AM.
 
Old 02-12-2014, 01:51 PM   #5
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,851

Original Poster
Blog Entries: 1

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
It works in gdb-7.7
 
  


Reply

Tags
aix gdb "info sh"


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NVidia drivers stopped working, thrown into "low-graphics mode", Ubuntu caibbor Linux - Software 3 01-05-2014 09:56 PM
"TOP" Command keeps going to "stopped" state mudtoe Linux - Newbie 3 03-09-2009 11:15 PM
"M-Audio Mobile Pre Usb" Soundcard stopped working sonium Linux - Hardware 1 12-21-2006 11:58 PM
Mom clicked a button and "it stopped working" antiocles Linux - Software 3 01-02-2005 01:35 PM
evolution stopped working - "CORBA" exception thegreatgatsby Linux - Software 3 03-16-2004 07:28 AM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration