Programming :: Extract Dwarf Information Debug A Section?

May 10, 2011

I would like to extract debug information but I have some problems. For example, I have a executable a.out...

Quote:

nm -f sysv a.out | grep ".global_var" >vars.txt

With this command I extract all my variables. All of them are in .global_var section, and it give me follow information:

Quote:

CAN_station_n |08073258| D | OBJECT|00000001| |.global_var
CONTROLend |080732a7| D | OBJECT|00000001| |.global_var

[code]....

Well, I have only address of my vars, but I would like to know type var or struct of the variables. With dwarf dump I have all of information, but it is a mess...

Quote:

<1><117bc>: Abbrev Number: 32 (DW_TAG_variable)
<117bd> DW_AT_name : (indirect string, offset: 0x153d): draw_limits
<117c1> DW_AT_decl_file : 128
<117c2> DW_AT_decl_line : 207

[code]...

Is there any parser or way to put in order this information?? create a file with the follow information:

name of var - address - type - size - struct or not

View 5 Replies


ADVERTISEMENT

Programming :: Perl Extract Information For A Particular Column?

Oct 24, 2010

I have a file which has the output as shown below:

Code:

Teams | matches |Goals | YC | RC
------------------------------------------------------------------------------
Liverpool: | | | |
Gerrard | 97 | 100 | 41665 | 1342

[code]....

I need to extract the Info from the RC column for the first 4 players of liverpool. The test code i have does the same,but can anyone show me a better way of doing it.I could do it easily with gawk -F"|" and print the respective column,but i need to do this in perl.

Code:

#!/usr/bin/perl
use strict;
use warnings;

[code]....

View 7 Replies View Related

Slackware :: Compiling Kernel 2.6.38.6 - Config Debug Section Mismatch

May 11, 2011

Anyone able to compile kernel 2.6.38.6 on Slackware 13.37 successfully using the config from testing/2.6.38.4? I was able to get .4 and .5 to compile successfully, but with .6 I get the following after running "make modules".

Code:
WARNING: modpost: Found 11 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
Running "make CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 > outfile" gives me a bunch of WARNINGS as follows:

Code:
WARNING: vmlinux.o(.text+0xe656a): Section mismatch in reference from the function build_all_zonelists() to the function .meminit.text:setup_zone_pageset.clone.56()
The function build_all_zonelists() references
the function __meminit setup_zone_pageset.clone.56().
This is often because build_all_zonelists lacks a __meminit
annotation or the annotation of setup_zone_pageset.clone.56 is wrong.....

WARNING: drivers/watchdog/nv_tco.o(.devinit.text+0x14): Section mismatch in reference from the function nv_tco_init() to the function .init.text:nv_tco_getdevice()
The function __devinit nv_tco_init() references
a function __init nv_tco_getdevice().
If nv_tco_getdevice is only used by nv_tco_init then
annotate nv_tco_getdevice with a matching annotation.

View 14 Replies View Related

General :: Crosstool From X86 To Alpha Lacks Detailed Debug Information?

Apr 7, 2010

I have a working build of crosstool - it was built for gcc 3.4.3 using glibc 2.3.5 going from 32-bit x86 linux to 64-bit alpha linux. As far as I can tell -- it compiles correctly (output of alpha emulation matches expected) but it has a major flaw. When I use the cross compiler and attempt to add detailed debug information, it compiles, but does not have the debug information. For example, when I execute:

> /home/leporter/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gcc-3.4.3 -g -o hello main.c

OR

> /home/leporter/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gcc-3.4.3 -gstabs -o hello main.c

I get a working alpha binary for hello world. BUT - when I run objdump - this is what I get

> /home/leporter/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-objdump -g hello

hello: file format elf64-alpha

/home/leporter/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-objdump: hello: no recognized debugging information

Frustratingly - if I use my x86 gcc version 3.4.6 to do the compilation (same arguments, just using the x86 compiler, not the cross compiler) - it correctly embeds the debug information.

View 2 Replies View Related

Ubuntu Multimedia :: Amarok Random Crashes \ Can't Retrieve The Debug Information?

Dec 21, 2010

ecently (since upgrade to Ubuntu 10.10) being having problems with Amarok randomly crashing.There doesn't seem to be any pattern and it normally just disappears and music stops. Occasionally it comes up with the KDE crash tracker but it can't retrieve the debug information (although i do have amarok-dbg installed, not sure what else i need for that to work though)Anyway i have run it from the terminal and this is the output i got towards the end:

Code:
amarok(7287)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("http://upload.wikimedia.org/wikipedia/commons

[code]....

View 2 Replies View Related

Ubuntu :: Using Cut And Grep To Extract Information?

Aug 2, 2011

How would I use cut or grep to take this line :

Code:

Load......................... 198 Watt(22 %)

and make it into this information, in a text file :

Code:

198 Watts

If you don't mind, please explain the process, as I have been trying to figure this command out, and I must be missing something.

View 9 Replies View Related

Ubuntu :: Download A Webpage To Extract Information?

Jun 30, 2011

I want to download a webpage to extract information. This used to work with other pages, but with this particular page [URL].., I get the following error.

Code:
bjvca@ifpri-laptop:~$ wget http://www.farmgainafrica.org/index.php?option=com_content&view=article&id=5&Itemid=27
[1] 10375
[2] 10376
[3] 10377

[Code]...

View 3 Replies View Related

General :: Write A Script To Extract Information From Db Tables?

May 25, 2010

I want to write a script that will extract information from a db table and store that information to a csv file. Basically, I have imported data into a table, I want to save this data to a csv file for later processing. How do I connect to the db and extraxt information from the table?

View 3 Replies View Related

OpenSUSE Install :: Immutable Section Of HDD + Differencing Section?

Jul 8, 2010

You maybe know that VirtualBox has an "immutable" feature for HDD images. I.e. setup the system, if the stuff is in place, you can set the image to IMMUTABLE to prevent any changes to the image. Differences are written to a separated image. So on the next boot you'll see that all the (unintended) changes are gone and the "old" system is up & running again. I run an old SuSE 10.3 on a write-protected SD-IDE-Adapter. Changing and playing with RPMs is a mess due to around 50 changes I had to do to make that work. Is there any option to mount an SD-card as RO and having all the changes written to e.g. /dev/sda3? To make it clear: I thought about something like a RAID-X system, but could not find any description on how to setup a raidtab.

View 3 Replies View Related

Programming :: Cannot Debug With The Gdb

Apr 21, 2009

downloaded a project from the Internet and tried to debug it, but run into a problem. i managed to copy the part where it build the executable I need. The problem is that I cannot use gdb with this executable for some reason. However, running the it without gdb seems to work ok. Below is what it shows when compiling and link.

Compile:

Code:

gcc -g -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION=""
-DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DPACKAGE="sphinx3"
-DVERSION="0.7" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1

[code]....

View 9 Replies View Related

Programming :: Debug C Cgi Script ?

Mar 3, 2011

I have a html page that calls a c cgi script on my local server; how can i view the html page and debug the script at the same time? if i would give some input in a form on the html page then i want to debug the script with the entered data. my gues was with w3m and gdb but i don't know how its done...

View 9 Replies View Related

Programming :: How To Debug Macros Under Gdb

Jun 14, 2010

It seems GDB can not expand or show the macro expansion or its definition under the GDB debug to while debugging the program. how to debug macros under GDB?

Sample Code:

#include <stdio.h>
#include "sample.h"
#define M 42
#define ADD(x) (M + x)

[code]....

View 7 Replies View Related

Programming :: Want To Debug Kernel.bin

Jan 31, 2010

I want debug kernel.bin
this file is boot in floppy

View 1 Replies View Related

Programming :: How To Debug Deployed Software

Nov 15, 2010

I have developed an application written in C, Linux well tested and stripped off all the symbols for final deployment. When I'm testing the stripped off version of the application in the field. Here the application has got crashed. Now how to debug the application.

View 6 Replies View Related

Programming :: Debug In Eclipse As Root?

Jun 16, 2010

debug my code as root in eclipse without starting the eclipse as root? I searched on the net, and seems like it is not possible.

View 4 Replies View Related

Programming :: Debug Library Source In GDB/DDD?

Aug 25, 2009

is there a way to debug my library files from DDD? Basically a way to pass the paths to DDD so I can view the source etc. I'm having a segmentation nightmare, which only crops up about every 10 or so starts, I know it's in one file in a library. I could move the source file into my general code to debug, but am sure there's a way in DDD.

View 1 Replies View Related

Programming :: Debug The Dsdv.cc File Of Ns-2?

Jun 26, 2011

I am trying to debug the dsdv.cc file of ns-2. I have attached the screenshots of the results.I added ns-2.34 as project in eclipse then opened dsdv.cc file. given a ".TCL" file as argument it runs ok. as in screenshot-1 but when i want to debug it gives the error "No Source Available for main at 0x83b269f" shown in screenshot-2.

View 1 Replies View Related

Programming :: How To Debug Large Project Using 'GDB'

Jun 21, 2010

I'm using ubuntu 9.04;I want to debug my project that comprises mutiple files.When I cd to the project folder and run the command "gdb rawusb_test",Once I tried the flag -g and changed the line "$(CC) -o $(PROG) $(OBJS) $(LIBS)" to "$(CC) -g -o $(PROG) $(OBJS) $(LIBS)", it didn't work!I want to trace the program "rawusb_test" line by line and see the parameters' values!Could you help me how I should debug this project or how the Makefile should be changed?

View 8 Replies View Related

Programming :: Debug Big C Language Project With GDB?

Nov 11, 2009

Now I have a project which include three directories /bin, /inc and /src. All of header files (*.h) are included in /inc and all of source(*.c) files are stored in /src, i.e. a.c, b.c, c.c..., the final generated executable file will locate in /bin. after compling with makefile, all of obj files will be generated in /src/obj like a.o, b.o, c.o, d....! Moreover an final.exe executable file will be generated in the /bin directory. Now if I want to debug it with GDB, how can I do it?

View 1 Replies View Related

Programming :: How To Debug Shell Scripts

Apr 26, 2010

I want to know how can I debug shell scripts.Many a times I found while installing a software or a package some where some link to some file or dependency is broken.Some one suggested me use of -vx in the beginning I want to know what are the other methods to debug shell scripts.

View 1 Replies View Related

Programming :: Debug The NTLM LWP Module ?

Nov 11, 2010

I'm trying to debug the NTLM LWP module.

I added use LWP:ebug qw(+); to the top of my script, but I can't see any change.

I'm on Windows if that makes a difference (installed activeperl).

I know there are probably a million reasons why something perl won't work, but can anyone help me get debug logging showing up?

View 1 Replies View Related

Ubuntu :: Two IDLE Icons In Application Programming Section?

Feb 16, 2011

For some reason I have two IDLE icons in my application programming section:

IDLE
IDLE(using python-2.6)

Both are the exact same versions, and I'm not sure if I need both. I understand that ubuntu runs on 2.6 so I'm a bit hesitant to just delete one without checking here first.

View 1 Replies View Related

Programming :: Append A Block Of Text Into A Particular Section Of A File?

Mar 16, 2010

So I have file which looks something like this:

cat .opera/operaprefs.ini
Code:
[User Prefs]
Language Files Directory=

[code]...

View 1 Replies View Related

Programming :: Deadlock Due To Crash Inside Critical Section?

May 12, 2011

The following two pieces of codes share printing to stdout with a POSIX semaphore /dev/shm/sem.abcd

sema1.c:

Code:
int j;
sem_t *sem = sem_open( "/abcd", O_CREAT, S_IRUSR|S_IWUSR, 1 );
j = 0;
while (j < 100) {

[Code].....

If started at the same time, the first will finish in about 10 seconds; the second 20 secs.

What I want to ask is, if the first program crashes at Checkpoint A, then B will never gets to continue, then normally how do programmers avoid this kind of deadlock due to crashes inside the critical section?

View 3 Replies View Related

Programming :: Extracting Last Section Of File (Separated By Hashes)

Feb 22, 2011

I have a file which looks something like this:

##########
some
text
text also includes empty lines
##########
some
more
text
##########

Basically all sections are separated by 10 hashes and I need to somehow only print all lines in the last section (the "some more text" part in the example above"). I tried all kind of things with sed and awk but I didn't find any way to identify the last "section".

View 8 Replies View Related

Programming :: Underscores In Standard Functions, An Example Section From Cat.c Is Included

Sep 4, 2010

From cat.c in GNU coreutils:

Code:
void
usage (int status)
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.

[Code]...

I don't remember ever seeing this in any examples I've ever seen, so I'm sure I've never seen an explanation of this.

View 1 Replies View Related

Debian Programming :: How To Debug A Gfortran Program

Oct 8, 2014

I have Windows 7==>Oracle VB==>Ubuntu==>Gfortran. How do I debug fortran programs? I would like to have a step by step debugging.

View 1 Replies View Related

Programming :: Autoconf And Automake - Debug And Release ?

May 6, 2010

After doing make I have the following questions? How can I see that the build is with debug information? What shall I do to build the release version? Can I have the release version in one directory and the debug version in another? I mean, when I change from debug to release, make will not overwrite the debug version.

View 7 Replies View Related

Programming :: Debug App Built By Libtool Using Eclipse?

Oct 17, 2010

I am trying to debug a src code that I download from the Internet.It is built with libtool. I am able to debug it with gdb, but i cannot debug it with eclipse.

View 3 Replies View Related

Programming :: Debug Remotely A Java Program With Ddd?

Jun 4, 2011

Is it possible to debug remotely a java program with ddd (data display debugger)?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved