Solved

DDD GDB HELP needed

Posted on 2004-04-13
8
333 Views
Last Modified: 2010-04-15
Hi, I am trying to debug my program using gdb, but I am getting this error for some reason:

(gdb) run test1.init /dev/null
Starting program: /auto/home-scf-27/chunchen/csci565/Lab3/test /dev/null

Program exited normally.
warning: Unable to find dynamic linker breakpoint function.
warning: GDB will be unable to debug shared library initializers
warning: and track explicitly loaded dynamic code.
You can't do that without a process to debug
(gdb)

I know the warning should not matter to my program but I am not sure why it says you can't do that without a process to debug.

The program i am loading is simply a program that prints 0 to 9.
I just wanted to test whether i can see the output in gdb or not.
As you can see, it does not print the output for some reason..

I did compile with -g flag.

Any help would be appreciated ..
thanks
0
Comment
Question by:lordiano
  • 3
  • 2
8 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10820779
What is the OS ? What version of gdb are you using ?
0
 
LVL 8

Expert Comment

by:ssnkumar
ID: 10820974
I think the reason I is that the (dynamic) library you are using is stripped. Try a "nm /lib/libc.so.0" and if it doesn't display
any symbols you need to get a non-stripped version.

Mandrake 7.1 was shipped with some stripped libraries.
Hope you are not using that OS.

-ssnkumar
0
 

Author Comment

by:lordiano
ID: 10822133
Problem solved, its some settings in my .cshrc file..
i will award points to those who answered nontheless!
thanks again guys
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:lordiano
ID: 10822190
sunnycoder, the problem was that i was soucing a non-default set of parameters in my .cshrc  
its actually kinda irrevelent to ddd or gdb... but rather environment setting issues.
0
 

Author Comment

by:lordiano
ID: 10822236
source /usr/local/lib/master.cshrc

I think this parameter line is gonna be meaningless unless you are in USC heh
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 0 total points
ID: 10822254
Question PAQed and 125 points refunded

sunnycoder
Page Editor
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question