Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Michael Schwingen
Zach Welch wrote: On Mon, 2009-11-30 at 14:42 -0800, David Brownell wrote: On Monday 30 November 2009, Zachary T Welch wrote: Registers a signal handler to catch SIGSEGV in order to display the stack where the program crashed. Is this for inside OpenOCD? If so, I'd rather

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Øyvind Harboe
Hm - I'm with David here: I am not very fond of re-inventing parts of gdb to include it in OpenOCD. Fully implementing this would make OpenOCD depend on libbfd just for crash reports - this is ridiculous. If something like this was added, it should not create any dependencies or do anything

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 09:37 +0100, Michael Schwingen wrote: Zach Welch wrote: On Mon, 2009-11-30 at 14:42 -0800, David Brownell wrote: On Monday 30 November 2009, Zachary T Welch wrote: Registers a signal handler to catch SIGSEGV in order to display the stack where the program

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 09:45 +0100, Øyvind Harboe wrote: Hm - I'm with David here: I am not very fond of re-inventing parts of gdb to include it in OpenOCD. Fully implementing this would make OpenOCD depend on libbfd just for crash reports - this is ridiculous. If something like this

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread David Brownell
Registers a signal handler to catch SIGSEGV in order to display the stack where the program crashed. Is this for inside OpenOCD? If so, I'd rather just expect folk to run inside GDB. Either they're running natively and should never see SEGV ... or they should be able to fire up

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Øyvind Harboe
On Tue, Dec 1, 2009 at 10:17 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 09:45 +0100, Øyvind Harboe wrote: Hm - I'm with David here: I am not very fond of re-inventing parts of gdb to include it in OpenOCD. Fully implementing this would make OpenOCD depend on libbfd

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread David Brownell
On Tuesday 01 December 2009, Øyvind Harboe wrote: How about adding an option to statically link with GDB or create a script that launched OpenOCD via GDB as default? I have shell scripts that start up OpenOCD and points it at a particular board. The src/openocd invocation is usually preceded

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Øyvind Harboe
2009/12/1 David Brownell davi...@pacbell.net: On Tuesday 01 December 2009, Ųyvind Harboe wrote: How about adding an option to statically link with GDB or create a script that launched OpenOCD via GDB as default? I have shell scripts that start up OpenOCD and points it at a particular board.

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 01:23 -0800, David Brownell wrote: Registers a signal handler to catch SIGSEGV in order to display the stack where the program crashed. Is this for inside OpenOCD? If so, I'd rather just expect folk to run inside GDB. Either they're running natively and

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 10:25 +0100, Øyvind Harboe wrote: On Tue, Dec 1, 2009 at 10:17 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 09:45 +0100, Øyvind Harboe wrote: Hm - I'm with David here: I am not very fond of re-inventing parts of gdb to include it in OpenOCD.

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Øyvind Harboe
No one was talking about linking with GDB.  That's just insane. ;) libbfd is part of binutils.  But again it should be_optional. OK. Explain the benefit of complicating OpenOCD vs. adding a script to launch OpenOCD via GDB then... Seriously... you've never had a Heisenbug either?  Am I

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread David Brownell
On Tuesday 01 December 2009, Øyvind Harboe wrote: The src/openocd invocation is usually preceded by a comment        # gdb --args \ this script does not work when some of the args have a space in them, but yes, a script pretty much like that one. :-) The args get quoted. GDB

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread David Brownell
On Tuesday 01 December 2009, Zach Welch wrote: On Tue, 2009-12-01 at 01:23 -0800, David Brownell wrote: Registers a signal handler to catch SIGSEGV in order to display the stack where the program crashed. Is this for inside OpenOCD? If so, I'd rather just expect folk to

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 01:52 -0800, David Brownell wrote: On Tuesday 01 December 2009, Zach Welch wrote: On Tue, 2009-12-01 at 01:23 -0800, David Brownell wrote: Registers a signal handler to catch SIGSEGV in order to display the stack where the program crashed. Is this

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 10:36 +0100, Øyvind Harboe wrote: No one was talking about linking with GDB. That's just insane. ;) libbfd is part of binutils. But again it should be_optional. OK. Explain the benefit of complicating OpenOCD vs. adding a script to launch OpenOCD via GDB then...

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Øyvind Harboe
On Tue, Dec 1, 2009 at 11:02 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 10:36 +0100, Øyvind Harboe wrote: No one was talking about linking with GDB.  That's just insane. ;) libbfd is part of binutils.  But again it should be_optional. OK. Explain the benefit of

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 11:06 +0100, Øyvind Harboe wrote: On Tue, Dec 1, 2009 at 11:02 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 10:36 +0100, Øyvind Harboe wrote: No one was talking about linking with GDB. That's just insane. ;) libbfd is part of binutils. But

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Øyvind Harboe
Again, you have missed the point.  This is about users and our releases. I cannot make that point more clearly.  It is not about developers who are willing to use GDB.  It's about users who aren't. I haven't done the statistics, but are we not seing SEGFAULT's in development builds mostly?

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Michael Schwingen
Zach Welch wrote: Hm - I'm with David here: I am not very fond of re-inventing parts of gdb to include it in OpenOCD. Fully implementing this would make OpenOCD depend on libbfd just for crash reports - this is ridiculous. You clearly missed the part where I say it will be

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 11:14 +0100, Øyvind Harboe wrote: Again, you have missed the point. This is about users and our releases. I cannot make that point more clearly. It is not about developers who are willing to use GDB. It's about users who aren't. I haven't done the statistics, but

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 11:27 +0100, Michael Schwingen wrote: Zach Welch wrote: Hm - I'm with David here: I am not very fond of re-inventing parts of gdb to include it in OpenOCD. Fully implementing this would make OpenOCD depend on libbfd just for crash reports - this is ridiculous.

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Michael Schwingen
Zach Welch wrote: To be fair, these extra steps also moot my Heisenbug argument; however, these are still activities that could be expected by these platforms' users. Running GDB is not a user activity, except _possibly_ when using it _with_ OpenOCD. Remember, not everyone uses OpenOCD with

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Øyvind Harboe
On Tue, Dec 1, 2009 at 1:49 PM, Michael Schwingen rincew...@discworld.dascon.de wrote: Zach Welch wrote: To be fair, these extra steps also moot my Heisenbug argument; however, these are still activities that could be expected by these platforms' users.  Running GDB is not a user activity,

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread David Brownell
On Tuesday 01 December 2009, Øyvind Harboe wrote: Zach made a good point that there are bug reports we are not receiving today. Those are the ones he's after here I think. I'm sure this project loses more potential bug reports by requiring folk to subscribe to Yet Another Mailing List than we

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Andreas Fritiofson
On Tue, Dec 1, 2009 at 10:32 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 10:25 +0100, Øyvind Harboe wrote: On Tue, Dec 1, 2009 at 10:17 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 09:45 +0100, Øyvind Harboe wrote: Hm - I'm with David here: I am

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 21:57 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 10:32 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 10:25 +0100, Øyvind Harboe wrote: On Tue, Dec 1, 2009 at 10:17 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Andreas Fritiofson
On Tue, Dec 1, 2009 at 10:23 PM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 21:57 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 10:32 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 10:25 +0100, Øyvind Harboe wrote: On Tue, Dec 1, 2009 at

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Andreas Fritiofson
On Tue, Dec 1, 2009 at 11:08 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Tue, Dec 1, 2009 at 10:23 PM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 21:57 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 10:32 AM, Zach Welch z...@superlucidity.net

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 23:09 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 11:08 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Tue, Dec 1, 2009 at 10:23 PM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 21:57 +0100, Andreas Fritiofson wrote: On

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Tue, 2009-12-01 at 10:08 -0800, David Brownell wrote: On Tuesday 01 December 2009, Øyvind Harboe wrote: Zach made a good point that there are bug reports we are not receiving today. Those are the ones he's after here I think. I'm sure this project loses more potential bug reports by

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Andreas Fritiofson
On Tue, Dec 1, 2009 at 11:50 PM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 23:09 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 11:08 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Tue, Dec 1, 2009 at 10:23 PM, Zach Welch z...@superlucidity.net

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Zach Welch
On Wed, 2009-12-02 at 00:56 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 11:50 PM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 23:09 +0100, Andreas Fritiofson wrote: [snip] I like it, except I think it needs to be disabled in the default case. We will get

[Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-11-30 Thread Zachary T Welch
Registers a signal handler to catch SIGSEGV in order to display the stack where the program crashed. Adds the 'stack' helper module with generic stack trace routines that can be used to implement better debugging messages. Signed-off-by: Zachary T Welch z...@superlucidity.net ---

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-11-30 Thread David Brownell
On Monday 30 November 2009, Zachary T Welch wrote: Registers a signal handler to catch SIGSEGV in order to display the stack where the program crashed. Is this for inside OpenOCD? If so, I'd rather just expect folk to run inside GDB. Either they're running natively and should never see SEGV

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-11-30 Thread Zach Welch
On Mon, 2009-11-30 at 14:42 -0800, David Brownell wrote: On Monday 30 November 2009, Zachary T Welch wrote: Registers a signal handler to catch SIGSEGV in order to display the stack where the program crashed. Is this for inside OpenOCD? If so, I'd rather just expect folk to run inside