I need a utility like Dr Watson under windows that would allow me to see
a stak trace and a register dump. Is there a&nything like that under linux?
Thanks
Use GDB
Igmar
No I can't. There is no debugger. I just want something that will write a
stack trace and register dump to a log file at the customer site...
I know gdb but this is not possible.
Thanks anyway
jacob
> Igmar Palsenberg a écrit :
>> On 3/29/10 11:17 AM, jacob navia wrote:
<snip>
>>> I need a utility like Dr Watson under windows that would allow me to see
>>> a stak trace and a register dump. Is there a&nything like that
>>> under linux?
>>
>> Use GDB
>
> No I can't. There is no debugger. I just want something that will write a
> stack trace and register dump to a log file at the customer site...
You really need to ask in a Unix/Linux group. You must have a
peculiar situation if there is no gdb and that will need specialist
advice. Remember to give as much detail as you can.
--
Ben.
> No I can't. There is no debugger. I just want something that will
> write a stack trace and register dump to a log file at the customer
> site...
If it's a matter of not wanting to explain to the customer how to drive
GDB over the 'phone, then perhaps valgrind would be a better option?
(As it essentially requires no human to drive, and just dumps out a
report.)
B.
Customer (C): Your DAMMED programmed crashed AGAIN you MORON!
Jacob(j): Gulp... Sorry Sir, I can't explain it, I tested and tested.
Please can you open a command line?
C: A what?
j: A command line. You go into Applications, then Utilities and then
command line.
C: I can't see any "applications" I just see: "login".
j: Ah of course. Then you just write: root/password.
C: Now I see a black screen with a pound sign.
j: OK. Now you type:
cd /home/database/applications/start
C: It says -bash: /home is a directory
j: What? Ah OK. Do not put a space between the /home and the
directory word.
etc... etc... etc
Imagine explaining gdb to them. Besides, there is no core
file and gdb would be completely useless after the program
has exited.
> then perhaps valgrind would be a better option?
> (As it essentially requires no human to drive, and just dumps out a
> report.)
But it would affect performance isn't it?
I mean, my application doesn't crash all the time.
Thanks for your help.
jacob
If you're linking against glibc you can get a backtrace with the
backtrace() functionm, just call it from a signal handler for SIGSEGV.
Tom
> Rob Kendrick a écrit :
>> On Mon, 29 Mar 2010 13:08:23 +0200
>> jacob navia <ja...@nospam.org> wrote:
>>
>>> No I can't. There is no debugger. I just want something that will
>>> write a stack trace and register dump to a log file at the customer
>>> site...
>>
>> If it's a matter of not wanting to explain to the customer how to drive
>> GDB over the 'phone,
>
> Customer (C): Your DAMMED programmed crashed AGAIN you MORON!
> Jacob(j): Gulp... Sorry Sir, I can't explain it, I tested and tested.
> Please can you open a command line?
> C: A what?
> j: A command line. You go into Applications, then Utilities and then
> command line.
> C: I can't see any "applications" I just see: "login".
> j: Ah of course. Then you just write: root/password.
> C: Now I see a black screen with a pound sign.
> j: OK. Now you type:
> cd /home/database/applications/start
> C: It says -bash: /home is a directory
> j: What? Ah OK. Do not put a space between the /home and the
> directory word.
Obviously that's not how one should do support. Why not ask in a
group where people will be able to discuss all the options that are
available to you? Remember to tell people there what constraints you
are working under along with as much as possible about the target
environment.
<snip>
--
Ben.
>
> Imagine explaining gdb to them. Besides, there is no core
> file and gdb would be completely useless after the program
> has exited.
Well you can enable core file , with setrlimit (RLIMIT_CORE).
If you can examine logs on user machine, then you can download
core file and examine in your machine with gdb, too.
Core file is far better anyway than plain log,
as you can debug program and examine situation.
Of course don't forget to compile with debug info (-g option)
so you can trace with source code, not just function names.
Greets!
Sometimes online sometimes not
Why not ask in a newsgroup where you don't believe it to be OT, such
as comp.unix.programmer?
You might want to tell them a) what you mean by "crashing" and b) why
you don't get a core file that can be examined.
There's code in glibc to do a little bit of this, but a register dump really
MUST be done by some other program.
Anyway, what you probably *really* want is a core file. A lot of modern
Linux systems turn off coredumps by default, but if you turn them back on,
you get a file which has not only stack and registers, but the complete
memory image of the executable, allowing you to use gdb at your leisure
to explore the various stack frames.
-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet...@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
> Why not ask in a newsgroup where you don't believe it to be OT, such
> as comp.unix.programmer?
Because he would very much rather pollute this news group.
Depending on the particular flavor of Linux, you should have one or more of:
adb, sdb, gdb, dbx, debug
(No significance to the order other than that's what has been burned into
ROM in my brain.)
Type the command "type adb sdb gdb dbx debug" and see which ones give you a
path to the executable rather than "not found".
My preference du jour is "debug", followed by "gdb".
--
Kenneth Brody
IMHO, valgrind is great for this kind of problem - if you can, compile
your code with debugging symbols for even better results
My thanks and much appreciation for any suggestions. Email
can be sent to me at the above address (txr AT alumni.caltech.edu).
I will be able to read c.l.c for a time in case someone
can't easily send email or prefers to post to the newsgroup
(please remember to include the "OT" in the Subject: line).
For text-only access, reasonable free options are <http://www.aioe.org> and
http://www.eternal-september.org/
A good, low-cost solution is http://news.individual.net
If you need binary access, look into block accounts. You purchase a chunk of
bandwidth and use it up at your own rate.
Brian
My thanks and appreciation to everyone who replied (most
did by email). I'm still on my old service but the
cutoff date for that is April 7 (ie, today in most parts
of the world, including here soon). Now for trying to
get a new service working....
aioe.org is the host of the troll posting the "seebs/schildt" messages. A
bit of research turns up general suspicions that this is not a good choice
for news servers -- because the troll picked them for a good reason.
Basically, their policy comes down to "you can pursue your vendetta here
for free and with total anonymity", so the rational thing to do is probably
to ignore anything from them -- making it a bad choice for people whose goals
include participation in topical discussions.
One of the big problems you face picking a news server is that you
want something that deals with outbound abuse, rather than only filtering
incoming abuse. Otherwise, your messages will tend to get lost. It looks
like, at this point, aioe.org is best if you have a need to maintain total
anonymity, but otherwise not so great. Use it to post harassment, don't
use it to post topical discussion on technical topics.
Any time I see idiocy on usenet, one of the first things that goes
through my mind is that it's just another aioe idiot. So much so
that kooks, cranks, and trolls from there now have a blanket ban
in some of the newsgroups I read:
~/News/rec.autos.sport.f1.SCORE:5: ("aioe.org!not-for-mail" -1000 nil s)
~/News/sci.crypt.SCORE:138: ("user.aioe.org" -1000 nil s)
~/sci.math.SCORE:342: ("X-Complaints-To: ab...@aioe.org" -1000 nil s)
(I'm surprised it not more than just 3 groups, to be honest!)
> Basically, their policy comes down to "you can pursue your vendetta here
> for free and with total anonymity", so the rational thing to do is probably
> to ignore anything from them -- making it a bad choice for people whose goals
> include participation in topical discussions.
It's not total anonymity any more, it's pseudonymity, as they do
have a consistent identification for each account that can be kill-
filed or reported for abuse purposes. However, there's little to
stop trolls registering a steady stream of such accounts. I've not
been tempted to remove aioe from any of the killfiles, shall we say.
Phil
--
I find the easiest thing to do is to k/f myself and just troll away
-- David Melville on r.a.s.f1
[program crashed on customer site- suggestion: use gdb]
> >> No I can't. There is no debugger. I just want something that will
> >> write a stack trace and register dump to a log file at the customer
> >> site...
>
> > If it's a matter of not wanting to explain to the customer how to drive
> > GDB over the 'phone,
this kind of blows Richard <always use a debugger>'s argument out of
the water. This is one of the classic instances where a decent log
file would be massivly helpful.
I really do feel for you, no matter how much you testing you do the
real world can ambush you.
This is also why I leave the assert()s in...
can the customer email the core dump to you?
> Customer (C): Your DAMMED programmed crashed AGAIN you MORON!
> Jacob(j): Gulp... Sorry Sir, I can't explain it, I tested and tested.
> Please can you open a command line?
> C: A what?
> j: A command line. You go into Applications, then Utilities and then
> command line.
> C: I can't see any "applications" I just see: "login".
> j: Ah of course. Then you just write: root/password.
> C: Now I see a black screen with a pound sign.
> j: OK. Now you type:
> cd /home/database/applications/start
> C: It says -bash: /home is a directory
> j: What? Ah OK. Do not put a space between the /home and the
> directory word.
>
> etc... etc... etc
>
> Imagine explaining gdb to them.
:-)
I've done things like this. Fun isn't it?
> Besides, there is no core file
so enable core files
> and gdb would be completely useless after the program
> has exited.
>
> > then perhaps valgrind would be a better option?
> > (As it essentially requires no human to drive, and just dumps out a
> > report.)
>
> But it would affect performance isn't it?
>
> I mean, my application doesn't crash all the time.
richard <no-name>: what would you do?
Cheap but reliable, with most of the spam filtered out. No binaries.
http://www.news.individual.net/
Cheap among providers offering binaries.
http://www.teranews.com/
https://secure.usenetbilling.com/newbilling/manageaccount.cgi?referredby=1215986668&action=Create+New+Account&vendor=teranews
Free but not especially reliable
Free, reported as rather reliable:
http://www.eternal-september.org/
Is that enough?
I'm not familiar with gnus.
Robert Miles