Stack memory area print that would show symbols and memory address using GDB
location: linuxquestions.com - date: September 16, 2014
Hi
I am seeing some stack smashing issue in my program. I have used btrace /where and could see where the problem is. I would like get a complete view of the stack during this issue, to when the stack overflow is happening what all memory areas of my code are getting corrupted How would I do that? The current support with btrace/where just limits to the parameter in scope, but doesn't show the stack overflowen/corrupted area. Please advice.
Let me know if anymore details required.
Thanks
YA
[SOLVED] Need help using sed to remove preceding and trailing spaces in CSV
location: linuxquestions.com - date: September 16, 2010
Hello,
I need help removing the preceding and trailing spaces around the commas in my CSV without destroying my address field. I'm new to regex and sed so this is probably easy but I just can't do it without destroying the Address section. Any help would be greatly appreciated. I'm using vanilla Linux and sed 4.1.3
I'm willing to use any regex or even awk if needed.
Example:
I need this
randall , dean, 11111 , 1309 Hillside Ave., Warsaw, VA , 23591
tina , jane , 22222, 1309 Hillside Ave.,Warsaw , VA, 23591
to become this
randall,dean,11111,1309 Hillside Ave.,Warsaw,VA,23591
tina,jane,22222,1309 Hillside Ave.,Warsaw,VA,23591
Update: Say the file name is fixed_all_3.csv I have it most of the way with the following:
sed "s/^ *//;s/ *$//;s/ \{1,\}//g" fixed_all_3.csv > fixed_all_4.csv
The problem is that it also removes all the spaces from the address section so 1309 Hillside Ave. becomes 1309hillsideave.
GDB debugger breakpoints
location: linuxquestions.com - date: May 7, 2008
I'm having a little syntax trouble while setting a break point. If I have a program 'prg.c' and want to set a break at line 70, I just enter 'b 70'. But if I want to set a break in a file 'prg2.c' which is linked in with the same excecutable, I'm not sure what the syntax should be. I've tried things like:
b prg2.c;70
b prg2;70
b prg2 70
none of which work. I've also tried mentioning the routine in 'prg2.c' that the breakpoint would be in, which didn't work either. Any hints would be appreciated.
How to analyse a crash dump file using GDB
location: linuxexchange.com - date: October 11, 2009
I have a server application running under Cent OS. The server answers many requests per second but it repeatedly crashes after each hour or so and creates a crash dump file. The situation is really bad and I need to find out the crash cause as soon as possible.
I suspect that the problem is a concurrency problem but I'm not sure. I have access to the source code and crash dump files but I don't know how to use the crash dumps to pin point the problem.
Any suggestions are much appreciated.
Why are there no debug symbols in my vmlinux when using gdb with /proc/kcore?
location: linuxexchange.com - date: August 11, 2015
I've configure all CONFIG_DEBUG_ related options to y,but when I try to debug the kernel,it says no debug symbols found:
gdb /usr/src/linux-2.6.32.9/vmlinux /proc/kcore
Reading symbols from /usr/src/linux-2.6.32.9/vmlinux...(no debugging symbols found)...done.
Why?
Using gdb stop the program when it is using any function from file X
location: linuxexchange.com - date: January 24, 2009
and I would like to know if there is any way to stop a program when is using a function from a certain file. Ideally what I am looking for is something like:
GDB Stop when use a function from file foo.cpp
The reason to do this is because I am debugging a code that is not mine and I do not know exactly what functions are been called and what functions are not. Is there a function in GDB to do what I am looking for, or any other recommended way to do something similar?.
Thanks
Debugging: stepping through Python script using gdb?
location: linuxexchange.com - date: April 16, 2013
Let's say we have the following mega-simple Python script:
print "Initializing"....
a=10
print "Variable value is %d" % (a)
print "All done!"
... and say, I'd like to debug this script by placing a breakpoint at line a=10, and then stepping through the script.
Now, I'd like to use gdb for this, because I'd like to debug Python bindings that may come as a part of a shared object (.so) library - hence, I'd ideally place a breakpoint on a Python code line, and then "step into" the C part of the shared object... (Note that DebuggingWithGdb - PythonInfo Wiki doesn't really explicitly state that this is possible)
The problem is: gdb on its own cannot really recognize breakpoints, placed on a Python script line:
$ gdb python
GNU gdb (GDB) 7.3.50.20110806-cvs
...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) b test.py:3
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint
connecting to wireless internet help (using hp mini)
location: ubuntuforums.com - date: December 25, 2009
ok so i just got an hp mini 110 netbook and ubuntu 9(the koala one). i have no clue how to connect to a wireless internet connection. the wifi switch on my computer is orange and i dont know if that means its on or off. when i run windows 7, wireless works just fine and the switch is white. whenever a move the switch it just stays orange. but anyway no wireless networks show up when i go to the network connections screen. i basically have no idea what the hell im doing and i dont know how to connect. help!!!
Help using Qemu to emulate application in ARM Architecture
location: ubuntuforums.com - date: September 2, 2015
Hello! (this is my first post here so I apologise if i've done something wrong.
So basically I have a server running ARM architecture of Ubuntu 15.04 (Which I connect to using SSH)
The processor type is Samsung Exynos-5422 Octa-Core.
Originally I did not know anything about ARM or even any kind of architectures, but the application I planned to run on it is not compatible with ARM only x86-64.
So after copious Google'ing I found an emulator called Qemu, unfortunately I found the guide very confusing...
Regardless I managed to install it, and by simply running the command 'qemu-arm' first I could then use the program I wanted..
I think i'm doing something wrong though, since the program only utilises one of the eight cores available (I checked using htop) and therefore becomes unbearably slow...
Is there some way I can have the emulator use all eight cores?
Thanks for any assistance you can provide!
Hugo.
Qt 5.2.1 / QtCreator 3.0.x: cannot debug using GDB with custom compilation process
location: linuxexchange.com - date: January 1, 1970
I am using Qt 5.2.1 (from QtCreator 3.0.x) on Ubuntu Linux (12.04 LTS) and I am trying to customize the build process... My aim is to have a build directory different from the source directory (additionally I would like to specify also different directories from temporary files)...
So at the end of the story, I want to have a build directory with the executable and all the shared libraries (so I set the executable rpath to include its own directory) and I want to debug my application from that folder...
Here is my .pro file:
# Configure target directory
DESTDIR = $$PWD/build/bin
# Configure working (obj) directory
OBJECTS_DIR=$$PWD/build/obj
# Configure working (moc) directory
MOC_DIR=$$PWD/build/moc
# Let the linker to search for libraries in build path
# and set the executable search path for including its own folder
DOLLAR = $
QMAKE_LFLAGS += -L $$DESTDIR -Wl,-rpath,$${DOLLAR}$${DOLLAR}ORIGIN
Everything is fine: the compilation is performed exactly as I want... but I've a tr
please wait...
Page: 1 2 3 4 5 6 7 8 9 10