
Hello, I'd like to request access to the vault. I'm going to upload a proof-of-concept of some of the things I mentioned earlier in my thread about Boost.Debug. This early version gives simple stack traces in limited scenarios, only supports Windows, and isn't designed very well. Here's an example of a program using it in its current form: void test_func(int argc, int argc2, char* argv[]) { stack_trace trace(10); //Maximum depth of 10 levels std::cout << trace.string() << std::endl; } int main(int argc, char* argv[]) { test_func(argc, argc, argv); return 0; } and an example of the stack trace printed as a result of this program: void test_func(int, int, char**) [f:/dev/stack_trace/main.cpp:10] int main(int, char**) [f:/dev/stack_trace/main.cpp:23] int __tmainCRTStartup() [f:/dd/vctools/crt_bld/self_x86/crt/src/crtexe.c:406] int mainCRTStartup() [f:/dd/vctools/crt_bld/self_x86/crt/src/crtexe.c:389] It also currently supports printing the names of all the arguments, but it was hackish and I left it out until it undergoes some redesign. There is currently no documentation, but as this is just a proof of concept I'm currently only looking for people to help out with actual code and/or provide input, so I think that's ok for now. Thanks

Zachary Turner wrote:
I'd like to request access to the vault. I'm going to upload a proof-of-concept of some of the things I mentioned earlier in my thread about Boost.Debug. This early version gives simple stack traces in limited scenarios, only supports Windows, and isn't designed very well. Here's an example of a program using it in its current form:
void test_func(int argc, int argc2, char* argv[]) { stack_trace trace(10); //Maximum depth of 10 levels std::cout << trace.string() << std::endl; }
int main(int argc, char* argv[]) { test_func(argc, argc, argv); return 0; }
and an example of the stack trace printed as a result of this program:
void test_func(int, int, char**) [f:/dev/stack_trace/main.cpp:10] int main(int, char**) [f:/dev/stack_trace/main.cpp:23] int __tmainCRTStartup() [f:/dd/vctools/crt_bld/self_x86/crt/src/crtexe.c:406] int mainCRTStartup() [f:/dd/vctools/crt_bld/self_x86/crt/src/crtexe.c:389]
I have some very similar code that works with MSVC (32 bit targets, anyway), MinGW and Mac OS X. Please feel free to take anything you might want: http://bitbucket.org/edd/stack_trace/wiki/Home Also, someone has written some modifications to get the MinGW version to use a dll from Wine in order to loosen some of the licensing restrictions (the MinGW code needs to link against libbfd, which is GPL). More on that here: http://realazthat.blogspot.com/2008/12/stack-trace-from-within-program.html
It also currently supports printing the names of all the arguments, but it was hackish and I left it out until it undergoes some redesign.
I didn't go this far! Kind regards, Edd

Zachary Turner <divisortheory <at> gmail.com> writes:
Hello,
I'd like to request access to the vault. I'm going to upload a proof-of-concept of some of the things I mentioned earlier in my thread about Boost.Debug. This early version gives simple stack
Did you give some thought about merging your efforts with what I have in Boost.Test? Gennadiy

On Mon, Jun 15, 2009 at 1:22 PM, Gennadiy Rozental<rogeeff@gmail.com> wrote:
Zachary Turner <divisortheory <at> gmail.com> writes:
Hello,
I'd like to request access to the vault. I'm going to upload a proof-of-concept of some of the things I mentioned earlier in my thread about Boost.Debug. This early version gives simple stack
Did you give some thought about merging your efforts with what I have in Boost.Test?
A little bit. I looked at test/debug.hpp and it looks like currently you only support the features related to actually attaching debugger and setting breakpoints, etc. So far the only features I support are the opposite, those related to symbol information and call stack. So we haven't duplicated any work so far yet. I'm not sure if it makes more sense to continue with 2 separate libraries (Boost.Debug and Boost.Test), or to merge all of my stuff into Boost.Test, or to merge all of the stuff in debug.hpp into Boost.Debug. Nevertheless, I think my code is still at an early enough stage that it's not too important yet. A few people have privately expressed interest in helping to redesign some of the code I've already done, since I only consider myself a beginning to intermediate boost user :) I think after that effort has been underway a little while longer it will make more sense and be more clear how to combine the functionality. But the important thing is that so far there hasn't been any duplicated effort, and I don't think there is any danger of that in the near future since mostly right now it just needs to be thought about the design of the call stack related classes / interfaces some more.

2009/6/15 Zachary Turner <divisortheory@gmail.com>:
I'd like to request access to the vault.
You should be able to register yourself - at the vault site, click on login and look for the 'Register' link. If you want access to subversion, instructions are on the Trac wiki. Daniel

Has there been any progress on this library? I couldn't find it in the vault - or rather, the debug directory I found was dated 2007. Thanks, -Matt Daniel James wrote:
2009/6/15 Zachary Turner <divisortheory@gmail.com>:
I'd like to request access to the vault.
You should be able to register yourself - at the vault site, click on login and look for the 'Register' link. If you want access to subversion, instructions are on the Trac wiki.
Daniel

On Mon, Aug 10, 2009 at 4:31 PM, Matthew Chambers<matthew.chambers@vanderbilt.edu> wrote:
Has there been any progress on this library? I couldn't find it in the vault - or rather, the debug directory I found was dated 2007.
Thanks, -Matt
Not too much. I have more on my plate than I can handle right now and I just haven't had the time to do much with it, nor do I see the situation getting better in the foreseeable future. I did upload a copy to SourceForge at one point, a few other people had expressed interest so that was an easy way to allow mutliple people to look at it and maybe make some commits as well. It probably needs some major plumbing from a design standpoint, when I originally started working on it I knew absolutely nothing about the DIA SDK (the only way to get sufficient access to debug information on windows) and that's reflected in the design of some of the classes. I also had never used boost::variant<> at the time I originally wrote it, and that would have made the design quite a bit simpler as well. If you're interested I can point you to the SourceForge, currently it will print out a stack trace, and with only minor modifications it will even print out the names of the arguments to each function. But there are a lot of holes, and it also can only format primitive types and combinations of primitive types. So like it can successfully format types such as int, float, int*, int***, void(*)(int, float, double), but not types like struct foo, void (foo::*)(int, double), enums, or anything with templates.
participants (5)
-
Daniel James
-
Edd Dawson
-
Gennadiy Rozental
-
Matthew Chambers
-
Zachary Turner