* Add has_debugger_command() so whether or not a debugger command is available
can be checked. * Make the usb_keyboard module check the presence of the needed debugger commands to avoid the error messages in case of them being unavailable. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29472 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -142,6 +142,7 @@ extern status_t add_debugger_command_etc(const char* name,
|
|||||||
extern status_t add_debugger_command_alias(const char* newName,
|
extern status_t add_debugger_command_alias(const char* newName,
|
||||||
const char* oldName, const char* description);
|
const char* oldName, const char* description);
|
||||||
extern bool print_debugger_command_usage(const char* command);
|
extern bool print_debugger_command_usage(const char* command);
|
||||||
|
extern bool has_debugger_command(const char* command);
|
||||||
|
|
||||||
extern const char *debug_demangle_symbol(const char* symbol, char* buffer,
|
extern const char *debug_demangle_symbol(const char* symbol, char* buffer,
|
||||||
size_t bufferSize, bool* _isObjectMethod);
|
size_t bufferSize, bool* _isObjectMethod);
|
||||||
|
|||||||
@@ -150,6 +150,12 @@ static size_t sKeyTableSize = sizeof(sKeyTable) / sizeof(sKeyTable[0]);
|
|||||||
static void
|
static void
|
||||||
enter_debugger(void)
|
enter_debugger(void)
|
||||||
{
|
{
|
||||||
|
if (!has_debugger_command("get_usb_keyboard_config")
|
||||||
|
|| !has_debugger_command("get_usb_pipe_for_id")
|
||||||
|
|| (!has_debugger_command("uhci_process_transfer")
|
||||||
|
&& !has_debugger_command("ohci_process_transfer")))
|
||||||
|
return;
|
||||||
|
|
||||||
evaluate_debug_command("get_usb_keyboard_config");
|
evaluate_debug_command("get_usb_keyboard_config");
|
||||||
sUSBTransferLength = get_debug_variable("_usbReportSize", 0);
|
sUSBTransferLength = get_debug_variable("_usbReportSize", 0);
|
||||||
if (sUSBTransferLength == 0 || sUSBTransferLength > sizeof(sUSBTransferData))
|
if (sUSBTransferLength == 0 || sUSBTransferLength > sizeof(sUSBTransferData))
|
||||||
|
|||||||
@@ -496,6 +496,14 @@ print_debugger_command_usage(const char* commandName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
has_debugger_command(const char* commandName)
|
||||||
|
{
|
||||||
|
bool ambiguous;
|
||||||
|
return find_debugger_command(commandName, false, ambiguous) != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - public API
|
// #pragma mark - public API
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|||||||
Reference in New Issue
Block a user