trunk/src/osd/modules/debugger/osx/debugconsole.m
| r243689 | r243690 | |
| 240 | 240 | // if it doesn't exist, add a new one |
| 241 | 241 | NSString *command; |
| 242 | 242 | if (bp == NULL) |
| 243 | | command = [NSString stringWithFormat:@"bpset %lX", (unsigned long)address]; |
| 243 | command = [NSString stringWithFormat:@"bpset 0x%lX", (unsigned long)address]; |
| 244 | 244 | else |
| 245 | | command = [NSString stringWithFormat:@"bpclear %X", (unsigned)bp->index()]; |
| 245 | command = [NSString stringWithFormat:@"bpclear 0x%X", (unsigned)bp->index()]; |
| 246 | 246 | debug_console_execute_command(*machine, [command UTF8String], 1); |
| 247 | 247 | } |
| 248 | 248 | } |
| r243689 | r243690 | |
| 258 | 258 | { |
| 259 | 259 | NSString *command; |
| 260 | 260 | if (bp->enabled()) |
| 261 | | command = [NSString stringWithFormat:@"bpdisable %X", (unsigned)bp->index()]; |
| 261 | command = [NSString stringWithFormat:@"bpdisable 0x%X", (unsigned)bp->index()]; |
| 262 | 262 | else |
| 263 | | command = [NSString stringWithFormat:@"bpenable %X", (unsigned)bp->index()]; |
| 263 | command = [NSString stringWithFormat:@"bpenable 0x%X", (unsigned)bp->index()]; |
| 264 | 264 | debug_console_execute_command(*machine, [command UTF8String], 1); |
| 265 | 265 | } |
| 266 | 266 | } |
trunk/src/osd/modules/debugger/qt/dasmwindow.c
| r243689 | r243690 | |
| 128 | 128 | { |
| 129 | 129 | if (m_dasmView->view()->cursor_visible()) |
| 130 | 130 | { |
| 131 | | offs_t address = downcast<debug_view_disasm *>(m_dasmView->view())->selected_address(); |
| 132 | | device_t *device = m_dasmView->view()->source()->device(); |
| 133 | | device_debug *cpuinfo = device->debug(); |
| 131 | offs_t const address = downcast<debug_view_disasm *>(m_dasmView->view())->selected_address(); |
| 132 | device_t *const device = m_dasmView->view()->source()->device(); |
| 133 | device_debug *const cpuinfo = device->debug(); |
| 134 | 134 | |
| 135 | 135 | // Find an existing breakpoint at this address |
| 136 | 136 | INT32 bpindex = -1; |
| r243689 | r243690 | |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | // If none exists, add a new one |
| 149 | | if (debug_cpu_get_visible_cpu(*m_machine) == device) |
| 149 | if (bpindex == -1) |
| 150 | 150 | { |
| 151 | | astring command; |
| 152 | | if (bpindex == -1) |
| 153 | | { |
| 154 | | command.printf("bpset 0x%X", address); |
| 155 | | } |
| 156 | | else |
| 157 | | { |
| 158 | | command.printf("bpclear 0x%X", bpindex); |
| 159 | | } |
| 160 | | debug_console_execute_command(*m_machine, command, 1); |
| 151 | bpindex = cpuinfo->breakpoint_set(address, NULL, NULL); |
| 152 | debug_console_printf(*m_machine, "Breakpoint %X set\n", bpindex); |
| 161 | 153 | } |
| 162 | 154 | else |
| 163 | 155 | { |
| 164 | | if (bpindex == -1) |
| 165 | | { |
| 166 | | bpindex = cpuinfo->breakpoint_set(address, NULL, NULL); |
| 167 | | debug_console_printf(*m_machine, "Breakpoint %X set\n", bpindex); |
| 168 | | } |
| 169 | | else |
| 170 | | { |
| 171 | | cpuinfo->breakpoint_clear(bpindex); |
| 172 | | debug_console_printf(*m_machine, "Breakpoint %X cleared\n", bpindex); |
| 173 | | } |
| 174 | | m_machine->debug_view().update_all(); |
| 175 | | debugger_refresh_display(*m_machine); |
| 156 | cpuinfo->breakpoint_clear(bpindex); |
| 157 | debug_console_printf(*m_machine, "Breakpoint %X cleared\n", bpindex); |
| 176 | 158 | } |
| 159 | m_machine->debug_view().update_all(); |
| 160 | debugger_refresh_display(*m_machine); |
| 177 | 161 | } |
| 178 | 162 | |
| 179 | 163 | refreshAll(); |
| r243689 | r243690 | |
| 184 | 168 | { |
| 185 | 169 | if (m_dasmView->view()->cursor_visible()) |
| 186 | 170 | { |
| 187 | | offs_t address = downcast<debug_view_disasm*>(m_dasmView->view())->selected_address(); |
| 188 | | device_t *device = m_dasmView->view()->source()->device(); |
| 189 | | |
| 190 | | if (debug_cpu_get_visible_cpu(*m_machine) == device) |
| 191 | | { |
| 192 | | astring command; |
| 193 | | command.printf("go 0x%X", address); |
| 194 | | debug_console_execute_command(*m_machine, command, 1); |
| 195 | | } |
| 196 | | else |
| 197 | | { |
| 198 | | device->debug()->go(address); |
| 199 | | } |
| 171 | offs_t const address = downcast<debug_view_disasm*>(m_dasmView->view())->selected_address(); |
| 172 | m_dasmView->view()->source()->device()->debug()->go(address); |
| 200 | 173 | } |
| 201 | 174 | } |
| 202 | 175 | |