alias

The dbx alias service allows you to create an alias for a plug-in subcommand.

The syntax of the plug-in dbx subcommand requires the dbx user to type a prefix of plugin Name for each plug-in subcommand invocation. To provide a way to shorten such invocations, dbx allows plug-ins to create new aliases.

The alias and expansion parameters should provide a description of the new alias. The syntax is the same as the syntax defined for the alias dbx subcommand.

The following are example invocations of the dbx alias service:
alias("intprt", "plugin xyz interpret");
alias("intprt2(addr, count, format)", "addr / count format; plugin xyz interpret addr");
If you try to create an alias that has the same name as an existing alias, the request is denied and a warning message is displayed. Plug-in developers are encouraged to carry out alias creation in a way that allows users to correct alias conflicts. One way to accomplish this is by reading alias definitions from a configuration file that is packaged with the plug-in.
typedef int (*dbx_plugin_alias_service_t)(dbx_plugin_session_t session, 
                                          const char *alias, 
                                          const char *expansion)
The following table displays the dbx alias service parameters:
Parameter Description
session Session identifier
alias Character string representing the alias name and optional parameter
expansion Character string representing the alias expansion
The following list contains the dbx alias service return codes:
  • DBX_PLUGIN_SUCCESS
  • DBX_PLUGIN_BAD_SESSION — session is not valid
  • DBX_PLUGIN_BAD_ARG — alias is not valid
  • DBX_PLUGIN_BAD_POINTER — alias is NULL or expansion is NULL
  • DBX_PLUGIN_UNAVAILABLE — an alias with an identical name already exists