473,771 Members | 2,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why can't I use gdb?

After I type "make" on the screen, I got the following result:

/usr/local/sunone/SUNWspro/bin/CC -xs -pto -PIC -xtarget=ultra
-xarch=v9 -DIL_STD -g -xs -DNDEBUG
-I/usr/local/ilog/solver60/include
-I/usr/local/ilog/solver60/../concert20/include
-I/usr/local/ilog/solver60/examples/include
/uac/rshr/xhji/Ilog/money.cpp -c
/usr/local/sunone/SUNWspro/bin/CC -xs -pto -PIC -xtarget=ultra
-xarch=v9 -DIL_STD -g -xs -DNDEBUG
-I/usr/local/ilog/solver60/include
-I/usr/local/ilog/solver60/../concert20/include
-I/usr/local/ilog/solver60/examples/include money.o -o money -g
-L/usr/local/ilog/solver60/lib/ultrasparc64_8_ 6.2/static_pic_mt
-L/usr/local/ilog/solver60/../concert20/lib/ultrasparc64_8_ 6.2/static_pic_m*t

-lsolverfloat -lsolver -lconcert -lsocket -lnsl -lm -lsunmath
We can see that "-g" is there. But when I type "gdb money"(money is my
executable file name:)), I get:
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as
"sparc-sun-solaris2.6"..."/data/a1/rshr/xhji/Ilog/money": not in
executable format: File format not recognized
So I cannot debug normally! Then what's wrong with it? How can I debug
with gdb or dbx normally?
Thanks!

Feb 21 '06 #1
6 4441
Linda wrote:
[...]
So I cannot debug normally! Then what's wrong with it? How can I debug
with gdb or dbx normally?


Please try 'gnu.utils.help ' or any other '.help' newsgroup from the
'gnu.*' hierarchy. Here any utilities are OT since they are platform-
specific. As the last resort you should try a newsgroup for your OS.

V
--
Please remove capital As from my address when replying by mail
Feb 21 '06 #2
Linda wrote:
After I type "make" on the screen, I got the following result:

/usr/local/sunone/SUNWspro/bin/CC -xs -pto -PIC -xtarget=ultra
-xarch=v9 -DIL_STD -g -xs -DNDEBUG

We can see that "-g" is there. But when I type "gdb money"(money is my
executable file name:)), I get:

This GDB was configured as
"sparc-sun-solaris2.6"..."/data/a1/rshr/xhji/Ilog/money": not in
executable format: File format not recognized
So I cannot debug normally! Then what's wrong with it? How can I debug
with gdb or dbx normally?


Have you tried dbx as a debugger for this binary?
As the compiler you've used is Solaris CC, it is advisable to try dbx.

--Wg-

Feb 21 '06 #3
Thanks! And I have tried! When I type "dbx money", the result is:

Reading money
Reading ld.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libm.so.1
Reading libsunmath.so.1
Reading libCstd.so.1
Reading libCrun.so.1
Reading libw.so.1
Reading libc.so.1
Reading libdl.so.1
Reading libmp.so.2
Reading libc_psr.so.1
dbx: warning: Skipping debugging info (incompatible format) in
'money.o'

And in dbx, when I type "stop at 41", the result is:

dbx: no executable code at line "money.cpp" :41

So, what I should do next? Thanks!

Feb 21 '06 #4

Linda wrote:
Thanks! And I have tried! When I type "dbx money", the result is:

dbx: warning: Skipping debugging info (incompatible format) in
'money.o'

And in dbx, when I type "stop at 41", the result is:

dbx: no executable code at line "money.cpp" :41

So, what I should do next? Thanks!


I think you would have displaced your binary/source file to someother
place.
I mean, if the binary is moved to someother place from the original
place where compiled, after successful compilation with -g option, then
the debugger attempting to look at the source at the original location
fails which could result in not showing the source lines in debugger.

Please check that.

--Wg-

Feb 21 '06 #5
I cannot fully understand your suggestion. But after I removed those
things like -w -xO4 -xtarget=ultra -xarch=v8plus in Makefile, dbx can
work normally. But gdb can not still.

Thank you anyway!

Feb 21 '06 #6
Linda wrote:
I cannot fully understand your suggestion. But after I removed those
things like -w -xO4 -xtarget=ultra -xarch=v8plus in Makefile, dbx can
work normally. But gdb can not still.


As Victor told you, this off-topic here. You will better and more
thorough answers in the correct newsgroup. Also, read the information
below.

Brian
--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Feb 21 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3685
by: farzad | last post by:
Hi I try to install php_ming.so in my php . I am using Redhat 8.0 php 4.2.2 apache 2.0.4. I am doing as the howto install file want me to do. as follow. http://ming.sourceforge.net/install.html ------------------ download php_ming.so.gz uncompress it and copy it to your php modules directory
7
12967
by: Adams-Blake Co. | last post by:
This may be OT a bit, so maybe someone can point me in the right direction. I want to test a script that sends out an e-mail. I want to test it locally on my Mandrake Linux 8.2 box. It runs OK on my host (pair.com) but I have to upload it each time I want to test it. Is there something I need to do in order to test locally? Do I have to set up an SMTP server? Is that hard? Anything else needs to be done? CAN any of this
3
4049
by: lawrence | last post by:
I haven't been able to reach www.php.net for days. Most of the rest of the web is working for me, though I've bad trouble reaching any English sites. Anyone else having trouble?
6
2791
by: Michel | last post by:
Hi, I like to build a small simple dinamic website: Point-of-sale (detail-shop), So entering stock, logging all sales, print out invoices and download the logs to be imported into Excel. I once could write a bit in ASP/SQL/HTML/JAVASCRIPT and even some Excel-VBA but have lost most knowledge about that and I never know a lot nor did I know how to set up a simulating PC to write and test the website.
3
17066
by: nadia | last post by:
Is it possible to do the following in php: I want to have a main form open. In the form I want a button that will open a popup window so the user can search for something. The user can then select what they want, and the popup window closes and the main form (which is still open) shows the search results. Can anyone suggest a best course of action to acheive this? Thanks
6
2462
by: lawrence | last post by:
How dangerous or stupid is it for an object to have a reference to the object which contains it? If I have a class called $controllerForAll which has an arrray of all the objects that exist, what happens if one of those objects, when it is created, takes a reference to the object that contains it? Do bad things happen? class McShow {
5
12026
by: Alper Adatoz | last post by:
Hi, i have a little problem. i hope u guys give me a clear solution (: db: mssql i just want to put jpeg file to the image field at the mssql db. and after that i want to call it back..
2
5635
by: Sam Hou | last post by:
Dear all, I don't know where my problem is. Hopefully someone can give me some hint to explore the problem more. I am running Apache 2.0.48 wih PHP 4.3.4. The apache is running as nobody. I want to use the mail() to send out the email from a web page but it can't work. The web server is on the red hat linux 9.0 with rpm sendmail-8.12.8-9.90 and sendmail-cf. In the begining, I got the error message, 'SYSERR(nobody) can not write...
14
3896
by: NotGiven | last post by:
I am guessing I would hold a variable of when it's opened, then in the script that runs when the page is offloaded, I coudl calcualte it. How do you store a time variable? How do you calculate the amount of time (seconds) based on two timestamps? Thanks for your help and/or links to articles on the subject!
4
39508
by: Ryan Hubbard | last post by:
I would like to limit multiple logins for a user. How and when does the session id expire? Can I set it so after x minutes of inactivity it would expire. How do I check if session id exists? If I can do these two things then I can store the session id for a user in a database and everytime he requests an action I can just check if the session id is active or expired. If active let him continue if expired request to relogin. If the...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9911
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.