Incorrect address display by GDB


 
Thread Tools Search this Thread
Top Forums Programming Incorrect address display by GDB
# 1  
Old 03-18-2008
Data Incorrect address display by GDB

Hi,
On using GDB debugger on different executables, the address displayed for the symbols seem incorrect, as it shows me the same address in each prorgram, run simultaneoulsy.

eg:
Program: linkmain1.c

Breakpoint 1, main () at linkmain1.c:14
14 printf("In linkmain1.c\n");
(gdb) info addr main
Symbol "main" is a function at address 0x10780.

Program: linkmain.c

Breakpoint 1, main () at linkmain.c:14
14 printf("In linkmain.c\n");
(gdb) info addr main
Symbol "main" is a function at address 0x10780.

If you see, the address for main is displayed the same, in each executable. Smilie

I was basically trying to check if a shared library with PIC is actually shared between processes.


Please advice, on the above, or if i am making a mistake Smilie

BTW: I am using GDB on solaris
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

2. UNIX for Dummies Questions & Answers

Display Date and Time in GDB

In gdb is there any way we can display date/time in first column while debugging or is there any command which will print date/time? I am asking this just to know when exactly a breakpoint got hit. (6 Replies)
Discussion started by: rupeshkp728
6 Replies

3. IP Networking

Tracing a MAC address to IP address: Solaris

Hi there I lost connectivity to one of our remote systems and when I checked the messages log I found the following: Aug 10 23:42:34 host xntpd: time reset (step) 1.681729 s Aug 16 13:20:51 host ip: WARNING: node "mac address" is using our IP address x.x.x.x on aggr1 Aug 16 13:20:51 host... (9 Replies)
Discussion started by: notreallyhere
9 Replies

4. Shell Programming and Scripting

how to display an error if input value is not an IP address??

Dears, I need your assistance, I'm creating a shell script to read the IP address of a server and i would like to display an error message in red if the entered value is not an IP. any ideas how can i do it?:confused: #!/bin/sh echo "Please enter the server IP address: \c" read IPadd... (3 Replies)
Discussion started by: Dendany83
3 Replies

5. Solaris

CJS installation problem(client display:requesting internet address for 0:21:28:17:80:f4)

hi can anyone fine a solution thwe the problem that am facing i was trying to install sun4v client vth sol10_U8, but when i played "boot net" its asking for "requesting internet address for 0:21:28:17:80:f4 plz give me a sol for this (1 Reply)
Discussion started by: all_is_well
1 Replies

6. UNIX for Dummies Questions & Answers

Panic kernal-mode address fault on user address 0x14

:) Firstly Hi all!!, im NEW!! and on here hoping that someone might be able to offer me some help... i have a server that keeps crashing every few days with the error message: PANIC KERNAL-MODE ADDRESS FAULT ON USER ADDRESS 0X14 KERNAL PAGE FAULT FROM (CS:EIP)=(100:EF71B5BD) EAX=EF822000... (10 Replies)
Discussion started by: Twix
10 Replies

7. UNIX for Dummies Questions & Answers

unable to display the souce line in gdb

Hi All, I am unable to display the code in gdb. When i put list command i dont get any line. I mean i am unable to display the source line in gdb. Can any body help me. Thanks & Regards Gauri (4 Replies)
Discussion started by: gauri
4 Replies

8. IP Networking

How to Achive IP address through MAC(Ethernet) address

Hi sir, i want to make such programe which takes MAC(Ethernet) address of any host & give me its IP address....... but i'm nt getting that how i can pass the MAC address to Frame........ Please give me an idea for making such program... Thanks & regards Krishna (3 Replies)
Discussion started by: krishnacins
3 Replies

9. UNIX for Dummies Questions & Answers

Incorrect Directory Name

Hi, Can anyone help me. I have a problem when i try to find a particular directory using one enviroment, but it can find it in another. We have two enviroments ias9i and 9iAS when we run ldd -s filename for a particular file, the file is found but the directory is marked as ignore with... (1 Reply)
Discussion started by: jand102821
1 Replies
Login or Register to Ask a Question
GDBINIT(5)						       GNU Development Tools							GDBINIT(5)

NAME
gdbinit - GDB initialization scripts SYNOPSIS
/etc/gdbinit ~/.gdbinit ./.gdbinit DESCRIPTION
These files contain GDB commands to automatically execute during GDB startup. The lines of contents are canned sequences of commands, described in the GDB manual in node "Sequences" -- shell command "info -f gdb -n Sequences". Please read more in the GDB manual in node "Startup" -- shell command "info -f gdb -n Startup". /etc/gdbinit System-wide initialization file. It is executed unless user specified GDB option "-nx" or "-n". See more in the GDB manual in node "System-wide configuration" -- shell command "info -f gdb -n 'System-wide configuration'". ~/.gdbinit User initialization file. It is executed unless user specified GDB options "-nx", "-n" or "-nh". ./.gdbinit Initialization file for current directory. It may need to be enabled with GDB security command "set auto-load local-gdbinit". See more in the GDB manual in node "Init File in the Current Directory" -- shell command "info -f gdb -n 'Init File in the Current Directory'". OPTIONS
SEE ALSO
gdb(1), "info -f gdb -n Startup" The full documentation for GDB is maintained as a Texinfo manual. If the "info" and "gdb" programs and GDB's Texinfo documentation are properly installed at your site, the command info gdb should give you access to the complete manual. Using GDB: A Guide to the GNU Source-Level Debugger, Richard M. Stallman and Roland H. Pesch, July 1991. COPYRIGHT
Copyright (c) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." gdb-Red Hat Enterprise Linux 7.6.1-51.el7 2014-06-10 GDBINIT(5)