The OrbRiver debugger allows you to verify the contents of the messages exchanged between clients and services. The facilities offered are the following:
get the list of connected clients and services
get the list of debugged clients and services (connected or not)
control for which client or service you want debugging information
control if output is on screen or in a file
control the level of detail you want to be displayed per client or service:
no information
just the source and destination information
the whole detailed information, including (recursively if composite) the name, type and value of each parameter
The debugger is implemented as a Corba service controlled by a Corba client. The orbriver daemon has a special knowledge of this service so that it can dispatch to it any message if it is required to do so. The debugger client is the user interface to the debug service.
A special routine is added to allow or disallow client and services to be debugged:
procedure Corba.Orb.Set_Debug ( Self : in Corba.Orb.Object ; Debug_Name : in Corba.String ; Debuggable : in Boolean);
This routine has two purposes:
to give a debug name to the client or service
This is necessary for the debugger user interface to indicate which program should be debugged.
to tell whether or not this program can be debugged
This routine can be called at any time. However, it is recommanded to call it only once:
before Corba.Orb.Orb_Init
just after Corba.Orb.Orb_Init
If a client or service is started with the command
line parameter -DebugName &ls;name>, then it also becomes
debuggable, unless an explicit call to Corba.Orb.Set_Debug after
Corba.Orb.Orb_Init disables this feature.
A message is
displayed by the debugger if the source OR the destination is
debuggable and debugged. Only debuggable programs can be debugged.
The debugger will only be able to display the operations or
attributes if and only if their IDL is stored in the Interface
Repository (use ir_editor to do so).
If a client is
debuggable, then all the requests it sends go through the orbriver
daemon and direct connections to services are avoided. For
performance reasons, it is wise to use the -DebugName option only
when you want to debug a client.
In a shell window, run the debugger client
'$ORBRIVER_DIR/bin/debugger' as any other OrbRiver client, telling it
wich orbriver daemon you want to use. It displays the existing
debugger services. By using the command "setd", a debugger
service can be automatically started or an existing one can be used.
The debugger service displays its output in a newly created window.
You can have several debuggers running in parallel. When it is
launched automatically, the debugger displays on the same machine as
the orbriver daemon, it may not be the same display as the user.
You can launch your own debugger service by using
"start_debugger" in the bin directory. You need then to
give it a name using the command line option "-Name" and to
indicate which orbriver daemon to use.
For this example, $ORBRIVER_DIR/bin is supposed to be
in the PATH.
First, load the IDL used by the client or service
you want to debug:
ir_editor -ORBName orbada_1
> ld -I../Idl ../Idl/my_service.idl
> quit
Start your own debug service:
start_debugger -Name BM_Debugger -ORBName orbada_1
A new window then appears, which is the debugger
service display.
Start the debugger controller, attached it
to the debugger service and configure your clients or services for
debug:
debugger -ORBName orbada_1
The following debuggers are declared
BM_Debugger
> setd BM_Debugger
> set my_client expanded
In another window, run your client or service:
my_client.exe -DebugName my_client -ORBName orbada_1
Then all the requests and replies sent or received by this client are displayed in the debugger service window.
The debugger commands are the following:
Quit (alias q) to quit the debugger
Set_Debugger (alias setd) to set or change the debugger service to control
List (alias ls) to list all the connected clients and services
Debuggees (alias debs) to list the currently debugged clients and services
Set_Debug (alias set) to set the debuggable kind of a client or service
Set_Log (alias log) to set the log file name
Quote (no alias) to change the quote character
Cancel (no alias) to change the cancel character
Help (alias h) to display information about commands
Commands are not case sensitive.
Usage: quit
The debugger client exits, asking if you also want to stop the controlled debugger service.
Usage: setd <debugger service name>
The given debugger service becomes under control. If it does not exist or is not running, you are asked if you want to start it automatically.
Usage: List
This command displays the list of connected clients and services with their name, host and command line.
Usage: Debuggees
This command displays the list of currently debugged clients and services with their name, host and command line.
Usage: Set_Debug <debuggable name> <debugging kind>
This command sets the debugging kind for the client or service having the given name:
If no name is given, one is requested
If no kind is given, one is requested. It can be:
Ignored : meaning that debug is no longer wanted
No_Display : meaning that debug info is not to be displayed (just reserved by this debugger)
History : meaning that synthetic debug info is to be displayed
Expanded : meaning that full debug info is to be displayed
Usage: Set_Log <log file name>
This command sets the name of the file where debug info is to be stored.
If no name is given, one is requested.
If the name is 'no_log' (default), debug info is displayed on the screen in the OrbRiver Debug Service window else it is stored in the file with the given file name.
Usage: help [command]
With no parameter, the list of commands is displayed.
With a parameter, the given command is described.
Usage: Quote [<character>]
With no parameter, this command displays the current quoting character.
The given character will be used as the quoting character inside names in order to allow the use of special characters inside names.
Inside a name, the following characters must be quoted:
the space character ' '
the quote character itself
the cancel character
The default quote is '`'.
Usage: Cancel [<character>]
With no parameter, this command displays the current cancel character.
The given character will be used to cancel a command.
The default cancel character is '?'.
Copyright
Micro Focus 2002-2014. All rights reserved.