Previous 199869 Revisions Next

r35178 Saturday 21st February, 2015 at 14:19:09 UTC by Vasantha Crabb
More debugger consistency
[src/osd/modules/debugger/osx]debugconsole.m
[src/osd/modules/debugger/qt]dasmwindow.c

trunk/src/osd/modules/debugger/osx/debugconsole.m
r243689r243690
240240      // if it doesn't exist, add a new one
241241      NSString *command;
242242      if (bp == NULL)
243         command = [NSString stringWithFormat:@"bpset %lX", (unsigned long)address];
243         command = [NSString stringWithFormat:@"bpset 0x%lX", (unsigned long)address];
244244      else
245         command = [NSString stringWithFormat:@"bpclear %X", (unsigned)bp->index()];
245         command = [NSString stringWithFormat:@"bpclear 0x%X", (unsigned)bp->index()];
246246      debug_console_execute_command(*machine, [command UTF8String], 1);
247247   }
248248}
r243689r243690
258258      {
259259         NSString *command;
260260         if (bp->enabled())
261            command = [NSString stringWithFormat:@"bpdisable %X", (unsigned)bp->index()];
261            command = [NSString stringWithFormat:@"bpdisable 0x%X", (unsigned)bp->index()];
262262         else
263            command = [NSString stringWithFormat:@"bpenable %X", (unsigned)bp->index()];
263            command = [NSString stringWithFormat:@"bpenable 0x%X", (unsigned)bp->index()];
264264         debug_console_execute_command(*machine, [command UTF8String], 1);
265265      }
266266   }
trunk/src/osd/modules/debugger/qt/dasmwindow.c
r243689r243690
128128{
129129   if (m_dasmView->view()->cursor_visible())
130130   {
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();
134134
135135      // Find an existing breakpoint at this address
136136      INT32 bpindex = -1;
r243689r243690
146146      }
147147
148148      // If none exists, add a new one
149      if (debug_cpu_get_visible_cpu(*m_machine) == device)
149      if (bpindex == -1)
150150      {
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);
161153      }
162154      else
163155      {
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);
176158      }
159      m_machine->debug_view().update_all();
160      debugger_refresh_display(*m_machine);
177161   }
178162
179163   refreshAll();
r243689r243690
184168{
185169   if (m_dasmView->view()->cursor_visible())
186170   {
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);
200173   }
201174}
202175


Previous 199869 Revisions Next


© 1997-2024 The MAME Team