History log of /haiku-fatelf/src/servers/debug/DebugServer.cpp
Revision Date Author Comments
# c6cd8df7 26-Dec-2012 Humdinger <humdingerb@gmail.com>

Correct case in GUI string.


# bbdb6052 18-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Switch over to using Debugger as the primary system debugger.

- When a crash occurs that requires using consoled, use Debugger
in CLI mode.

- Closes #1078.


# 4e156d9a 23-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Allow saving a crash report from debug_server.

- When debug_server is built to use the graphical debugger as its
crash handler, also present the option to save a report instead
of debugging the app. Doesn't work 100% correctly yet though since
the report generator needs to wait for stack traces to be generated
if they aren't yet ready.


# f3e4f18b 09-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Debugging fixes.

* INT3 had the wrong DPL set in the IDT, could not be raised from
userland.
* Need the debug server running.


# aed35104 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 6e2f6d1a 29-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Changed cookie type for get_next_area_info() to ssize_t.

The cookie is used to store the base address of the area that was just
visited. On 64-bit systems, int32 is not sufficient. Therefore, changed
to ssize_t which retains compatibility on x86 while expanding to a
sufficient size on x86_64.


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 04209cdd 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Catch a app_server crash in the debug server. Let the registrar restart the app_server and notify all apps.


# 9dd2d63b 06-Dec-2011 Rene Gollent <anevilyak@gmail.com>

- We now build up the argument list in a BStringList and map argv to those.
The previous solution had various issues where argv pointed to stack-based
objects that had potentially been destroyed/overwritten already. Fixes
#8173.

- Modify _SetupGDBArguments() to return an error code and check for it
accordingly.


# c0954dc6 06-Dec-2011 Rene Gollent <anevilyak@gmail.com>

- We now build up the argument list in a BStringList and map argv to those.
The previous solution had various issues where argv pointed to stack-based
objects that had potentially been destroyed/overwritten already. Fixes
#8173.

- Modify _SetupGDBArguments() to return an error code and check for it
accordingly.


# 323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 8215661b 29-Oct-2011 François Revol <revol@free.fr>

Apply patch by 'mt' from ticket #7622 to localize the debug_server alert. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42979 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9918b716 17-Jul-2011 Rene Gollent <anevilyak@gmail.com>

- Factor out setting up the arguments for gdb handover.
- When using the graphical debugger by default, fall back
to setting up gdb handover if the GUI is unavailable.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42446 a95241bf-73f2-0310-859d-f6bbb57e9c96


# de6f745c 17-Jul-2011 Rene Gollent <anevilyak@gmail.com>

Add support for conditionally compiling the debug_server to hand off crashed
teams to the native debugger instead. This assumes the latter is installed
in /boot/system/apps.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42445 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a608485f 14-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* Added new team flag B_TEAM_DEBUG_PREVENT_EXIT that prevents teams from exiting
via exit() (the calling thread will drop into the debugger instead).
* The DebugServer now uses this flag by default.
* Added TODO comment: the default debugger should already be able to set a flag
like this in order to close a race condition between dropping a thread into
the debugger and setting the flag.
* Cleaned up the debug_server sources a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36265 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f379156 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* debug_create_symbol_lookup_context() gets a team ID instead of a
debug context now. That's all it needs.
* Added the option "-a" to the profile command line tool. It triggers profiling
of the whole system. There are still some issues, particularly image related
ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30129 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 317bd7dd 03-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed directory structure as suggested on the mailing list.
* Made the TimeZoneView less error prone, and also actually use Haiku code (the
previous check didn't work since it used #if, not #ifdef).
* Also took the liberty to rename our boot loader to haiku_loader, since I had
to update the nasm binary anyway. Updated the assembly sources to nasm 2.0.
* I haven't found where the synth location in the MIDI code is specified,
though.
* Also, NetBootArchive, and FloppyBootImage haven't been updated yet. Will do
so next.
* Some optional packages still put their license to beos/etc/licenses. I didn't
update them yet, as we'll probably do so anyway at some point. Also, I think
we might want to introduce a common/data/licenses instead for those.
* If you encounter any problems, please tell!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb5d7021 23-Feb-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

TeamDebugHandler::_HandlerThread(): Remove and delete the team handler in any
case, not only when we kill the team, i.e. also when the team just died or we
handed it over to another debugger. We can do this, since it is also safe to
assume that we won't get any further debug messages from the team after a
B_DEBUGGER_MESSAGE_TEAM_DELETED or B_DEBUGGER_MESSAGE_HANDED_OVER. We were
leaking (well, keeping) the team handler in those cases, which was a problem
in the latter one, since we silently ate all debug messages for the team in
case it would be re-attached later. Fixes bug #2942.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29300 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 28ff3e2c 23-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* the name of an image is actually B_PATH_NAME_LENGTH long


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23707 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0644c0e3 23-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* actually print the image name if a symbol name could not be found


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23706 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7301a7fb 13-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

bonefish+axeld:
* The debug_server now sends the registrar messages whenever the debug alert
is shown, and also, if the user wants to debug the team.
* In the latter case, the registrar will now cancel a shutdown process.
* Also, it will now wait with the shutdown process until the user has
acknowledged the debugger alert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22926 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac7fc18b 12-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Always allow debugging a team, even if it wasn't possible to get its
executable path. It seems, gdb doesn't produce very helpful stack traces
then, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21915 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38979f27 16-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* All "GUI servers" (app server, input server, and registrar) will now be
debugged automatically in a consoled session, when they crash. Note,
that after a recoverable error (like a debugger() call) one can
"detach" the debugged team in gdb, "quit", and continue as if
nothing happened. 8-O
* The input server will no longer be killed when starting the debugger
in a consoled session. Not sure why it was done; it simply works as it
is now.
* Replaced all printf()s and fprintf()s by debug_printf() or TRACE(()).
The debug server prints little enough anyway. In fact only when something
crashes or an unexpected error occurs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20145 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8a93edb6 22-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Made all server version and signatures consistent, and thus closing bug #909.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b4fbcf3 28-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

* Now dumps a message to the serial debug output in case a GUI server died; if the
registrar or the input_server died, you didn't get any notification before.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18970 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82584ab9 09-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented AS_DIRECT_WINDOW_SET_FULLSCREEN so that it sets kWindowScreenFeel
when enabled, and B_NORMAL_WINDOW_FEEL when disabled. IOW when enabled, no
other windows can interfere.
* Therefore, it's no longer necessary to have the screen_blanker window
use kWindowScreenFeel - it will set its window to full screen as long
as the blanker runs.
* Added a AS_APP_CRASHED notification in the app_server that will remove
all kWindowScreenFeels from the windows of the crashed app.
* This is now used by the debugger to ensure that the debugger alert will
be visible.
* Factored out a DesktopLink class out of the BRoster::_ActivateApp()
method. This class is now also used in the new BRoster::_ApplicationCrashed()
method as used in the debug_server (via BRoster::Private).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 696e7270 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

The debug_server now uses the standard terminal for debugging - we no longer
need MiniTerminal, it's no longer included in the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15822 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e2218e5 21-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Provide a useful window title for the debug terminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13798 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a323d35 16-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for looking up symbols of other team to libdebug. The
debug_server uses this feature to print stack traces with symbols.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13698 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9ce15c9 14-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reworked the design: It certainly doesn't make sense to display more than
one alert, when two threads of a team crash. Now we have a per team queue
of debug messages and a thread per team that processes them (that is
usually only the first one). The application class does nothing anymore.
* Implemented debugger handover:
- In case of normal apps, when the relevant servers needed for GUI are
running, we show an alert and, if requested, start a MiniTerminal with
gdb for the crashed team. I couldn't really test it, since alerts don't
seem to work, respectively crash the app server (usually both ;-).
- In case the app server crashes, we always start a consoled with gdb.
This does indeed seem to work.
A gdb attached to a team is not really useful yet, since the shared object
relocations seem to be incorrect, so "bt" is not giving any useful info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13684 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 11a2999d 29-May-2005 Axel Dörfler <axeld@pinc-software.de>

Now also prints the area offsets next to the instruction pointer so you don't have
to enable debug output in the runtime linker and still have to compute the offsets
manually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12900 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b2c1ecd6 28-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added patch originally written by Ingo Weinhold:
- extended libdebug.so functionality to be able to get stack frames,
current instruction pointer, etc.
- changed the debug_server to be able to run as a simple BLooper - this
saves some trouble when the app_server dies
- the debug_server now prints out a stack crawl for the crashed team
(without symbols, though - for that data to be helpful you should
have a look at the loaded images (ie. where they start))
- the debug_server now also prints the team name when it kills it


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12882 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 362e09b1 20-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

In case of a debugger() call now also prints the debug message. Makes use of the new libdebug.so.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11926 a95241bf-73f2-0310-859d-f6bbb57e9c96


# edc47dd5 13-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

The debugger interface has changed a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11716 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a3b4050 12-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Adjustions due to changes in the debugger interface
(there's a separate B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED now).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11707 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 35e49f25 25-Feb-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Initial version of our debug server. This is the guy that hangs around
waiting for teams to crash to show our favorite alert.
Due to the missing app_server we don't show a alert yet. We just print
something to /dev/dprintf and kill the team. Unlike R5's debug server
ours will probably not provide any debugging functionality itself, but
rather employ gdb directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11492 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4e156d9a789fe4d0ab203c6e563abf4d9ec16299 23-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Allow saving a crash report from debug_server.

- When debug_server is built to use the graphical debugger as its
crash handler, also present the option to save a report instead
of debugging the app. Doesn't work 100% correctly yet though since
the report generator needs to wait for stack traces to be generated
if they aren't yet ready.


# f3e4f18be78e46d70a1883f750265a03f4fe0574 09-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Debugging fixes.

* INT3 had the wrong DPL set in the IDT, could not be raised from
userland.
* Need the debug server running.


# aed35104852941f0f6f3d1dcc5338b5f337d0a3c 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 6e2f6d1ace7490a200dcff70c52acf2af59c5bc3 29-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Changed cookie type for get_next_area_info() to ssize_t.

The cookie is used to store the base address of the area that was just
visited. On 64-bit systems, int32 is not sufficient. Therefore, changed
to ssize_t which retains compatibility on x86 while expanding to a
sufficient size on x86_64.


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 04209cdd81e0cc978a5da7a9c9a5175e11b4140c 21-Jan-2012 czeidler <haiku@clemens-zeidler.de>

Catch a app_server crash in the debug server. Let the registrar restart the app_server and notify all apps.


# 9dd2d63b15ad1aac2ad28cf37eb4bde036452e48 06-Dec-2011 Rene Gollent <anevilyak@gmail.com>

- We now build up the argument list in a BStringList and map argv to those.
The previous solution had various issues where argv pointed to stack-based
objects that had potentially been destroyed/overwritten already. Fixes
#8173.

- Modify _SetupGDBArguments() to return an error code and check for it
accordingly.


# c0954dc66186425eefeece8ce6a2c3b2720c6752 06-Dec-2011 Rene Gollent <anevilyak@gmail.com>

- We now build up the argument list in a BStringList and map argv to those.
The previous solution had various issues where argv pointed to stack-based
objects that had potentially been destroyed/overwritten already. Fixes
#8173.

- Modify _SetupGDBArguments() to return an error code and check for it
accordingly.


# 323b65468e5836bb27a5e373b14027d902349437 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 8215661bb2811fb6166433a87fd09123e88ea2b3 29-Oct-2011 François Revol <revol@free.fr>

Apply patch by 'mt' from ticket #7622 to localize the debug_server alert. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42979 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9918b71672f5f48606b74f6cf76190a83778a80e 17-Jul-2011 Rene Gollent <anevilyak@gmail.com>

- Factor out setting up the arguments for gdb handover.
- When using the graphical debugger by default, fall back
to setting up gdb handover if the GUI is unavailable.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42446 a95241bf-73f2-0310-859d-f6bbb57e9c96


# de6f745cdefd87ef157fd4e58d7a413a735ec905 17-Jul-2011 Rene Gollent <anevilyak@gmail.com>

Add support for conditionally compiling the debug_server to hand off crashed
teams to the native debugger instead. This assumes the latter is installed
in /boot/system/apps.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42445 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a608485f26d1e806f7e4d595a8a6eeafad36bd43 14-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* Added new team flag B_TEAM_DEBUG_PREVENT_EXIT that prevents teams from exiting
via exit() (the calling thread will drop into the debugger instead).
* The DebugServer now uses this flag by default.
* Added TODO comment: the default debugger should already be able to set a flag
like this in order to close a race condition between dropping a thread into
the debugger and setting the flag.
* Cleaned up the debug_server sources a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36265 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f3791568750bf18150d932c1e5fba2a215b9344 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* debug_create_symbol_lookup_context() gets a team ID instead of a
debug context now. That's all it needs.
* Added the option "-a" to the profile command line tool. It triggers profiling
of the whole system. There are still some issues, particularly image related
ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30129 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 317bd7dda3eb26d4d24ba5b0a831461119f70d34 03-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Changed directory structure as suggested on the mailing list.
* Made the TimeZoneView less error prone, and also actually use Haiku code (the
previous check didn't work since it used #if, not #ifdef).
* Also took the liberty to rename our boot loader to haiku_loader, since I had
to update the nasm binary anyway. Updated the assembly sources to nasm 2.0.
* I haven't found where the synth location in the MIDI code is specified,
though.
* Also, NetBootArchive, and FloppyBootImage haven't been updated yet. Will do
so next.
* Some optional packages still put their license to beos/etc/licenses. I didn't
update them yet, as we'll probably do so anyway at some point. Also, I think
we might want to introduce a common/data/licenses instead for those.
* If you encounter any problems, please tell!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb5d70219046d178adfbe3d2ff65c89d3e4c5ad4 23-Feb-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

TeamDebugHandler::_HandlerThread(): Remove and delete the team handler in any
case, not only when we kill the team, i.e. also when the team just died or we
handed it over to another debugger. We can do this, since it is also safe to
assume that we won't get any further debug messages from the team after a
B_DEBUGGER_MESSAGE_TEAM_DELETED or B_DEBUGGER_MESSAGE_HANDED_OVER. We were
leaking (well, keeping) the team handler in those cases, which was a problem
in the latter one, since we silently ate all debug messages for the team in
case it would be re-attached later. Fixes bug #2942.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29300 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 28ff3e2c9a44f8e06a5191a5825c13789ed49a2f 23-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* the name of an image is actually B_PATH_NAME_LENGTH long


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23707 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0644c0e33318d977541bbd56bfbe726ffc49f656 23-Jan-2008 Stephan Aßmus <superstippi@gmx.de>

* actually print the image name if a symbol name could not be found


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23706 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7301a7fbdbd860cf12024a0274ba9fd440ae8c5b 13-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

bonefish+axeld:
* The debug_server now sends the registrar messages whenever the debug alert
is shown, and also, if the user wants to debug the team.
* In the latter case, the registrar will now cancel a shutdown process.
* Also, it will now wait with the shutdown process until the user has
acknowledged the debugger alert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22926 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac7fc18b0973783319381299aa30a5bb23a1db68 12-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Always allow debugging a team, even if it wasn't possible to get its
executable path. It seems, gdb doesn't produce very helpful stack traces
then, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21915 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38979f27b05b2d64491213b9218453a4fce09350 16-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* All "GUI servers" (app server, input server, and registrar) will now be
debugged automatically in a consoled session, when they crash. Note,
that after a recoverable error (like a debugger() call) one can
"detach" the debugged team in gdb, "quit", and continue as if
nothing happened. 8-O
* The input server will no longer be killed when starting the debugger
in a consoled session. Not sure why it was done; it simply works as it
is now.
* Replaced all printf()s and fprintf()s by debug_printf() or TRACE(()).
The debug server prints little enough anyway. In fact only when something
crashes or an unexpected error occurs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20145 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8a93edb60c9297f3dce0e63465830567dcc4a5da 22-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Made all server version and signatures consistent, and thus closing bug #909.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b4fbcf3add88d945d975995be0ab41447d3aa8c 28-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

* Now dumps a message to the serial debug output in case a GUI server died; if the
registrar or the input_server died, you didn't get any notification before.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18970 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82584ab9c2996ff4dec740d64eb78c7c0b74c900 09-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Implemented AS_DIRECT_WINDOW_SET_FULLSCREEN so that it sets kWindowScreenFeel
when enabled, and B_NORMAL_WINDOW_FEEL when disabled. IOW when enabled, no
other windows can interfere.
* Therefore, it's no longer necessary to have the screen_blanker window
use kWindowScreenFeel - it will set its window to full screen as long
as the blanker runs.
* Added a AS_APP_CRASHED notification in the app_server that will remove
all kWindowScreenFeels from the windows of the crashed app.
* This is now used by the debugger to ensure that the debugger alert will
be visible.
* Factored out a DesktopLink class out of the BRoster::_ActivateApp()
method. This class is now also used in the new BRoster::_ApplicationCrashed()
method as used in the debug_server (via BRoster::Private).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17785 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 696e72709e6d98fbbac0b9d4586721585fca758a 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

The debug_server now uses the standard terminal for debugging - we no longer
need MiniTerminal, it's no longer included in the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15822 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e05fe1042cce6e00d194a147802d4f9be 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0e2218e5b9d13fef31bc9b988ed93c5368384914 21-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Provide a useful window title for the debug terminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13798 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a323d3533ed56555d16790d139f139e35b82a1f 16-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Added support for looking up symbols of other team to libdebug. The
debug_server uses this feature to print stack traces with symbols.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13698 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9ce15c94a19b9cb1b0a8c4e9f3fde589bc42cf6 14-Jul-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reworked the design: It certainly doesn't make sense to display more than
one alert, when two threads of a team crash. Now we have a per team queue
of debug messages and a thread per team that processes them (that is
usually only the first one). The application class does nothing anymore.
* Implemented debugger handover:
- In case of normal apps, when the relevant servers needed for GUI are
running, we show an alert and, if requested, start a MiniTerminal with
gdb for the crashed team. I couldn't really test it, since alerts don't
seem to work, respectively crash the app server (usually both ;-).
- In case the app server crashes, we always start a consoled with gdb.
This does indeed seem to work.
A gdb attached to a team is not really useful yet, since the shared object
relocations seem to be incorrect, so "bt" is not giving any useful info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13684 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 11a2999d10a017770c173e899fe16b50a079d8b0 29-May-2005 Axel Dörfler <axeld@pinc-software.de>

Now also prints the area offsets next to the instruction pointer so you don't have
to enable debug output in the runtime linker and still have to compute the offsets
manually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12900 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b2c1ecd640f14d0e85fefac0044dbf30ab142318 28-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added patch originally written by Ingo Weinhold:
- extended libdebug.so functionality to be able to get stack frames,
current instruction pointer, etc.
- changed the debug_server to be able to run as a simple BLooper - this
saves some trouble when the app_server dies
- the debug_server now prints out a stack crawl for the crashed team
(without symbols, though - for that data to be helpful you should
have a look at the loaded images (ie. where they start))
- the debug_server now also prints the team name when it kills it


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12882 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 362e09b1247897f6d6956b6a6dfc0759b8b45d5a 20-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

In case of a debugger() call now also prints the debug message. Makes use of the new libdebug.so.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11926 a95241bf-73f2-0310-859d-f6bbb57e9c96


# edc47dd5844092b02cd65c7f3529c2d861f9871b 13-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

The debugger interface has changed a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11716 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a3b405008be5a9c1a7c2f29ab931b1414028a73 12-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Adjustions due to changes in the debugger interface
(there's a separate B_DEBUGGER_MESSAGE_EXCEPTION_OCCURRED now).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11707 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 35e49f2582eed6a36620f79de55d4c9f3bfe3a30 25-Feb-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Initial version of our debug server. This is the guy that hangs around
waiting for teams to crash to show our favorite alert.
Due to the missing app_server we don't show a alert yet. We just print
something to /dev/dprintf and kill the team. Unlike R5's debug server
ours will probably not provide any debugging functionality itself, but
rather employ gdb directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11492 a95241bf-73f2-0310-859d-f6bbb57e9c96