Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.folklore.computers > #161582
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Subject | Re: Debugging Adventure using Address Break |
| Newsgroups | alt.folklore.computers |
| References | (7 earlier) <PM00052EF36C99680E@aca40d98.ipt.aol.com> <dlnu5dFpfn7U1@mid.individual.net> <PM00052F07BAB82A98@aca41172.ipt.aol.com> <ndc5oh$g6f$1@dont-email.me> <PM00052F3041A748FE@aca412e9.ipt.aol.com> |
| Message-ID | <vUxKy.84821$LP.79901@fx16.iad> (permalink) |
| Organization | UsenetServer - www.usenetserver.com |
| Date | 2016-03-29 16:17 +0000 |
jmfbahciv <See.above@aol.com> writes:
>Charles Richmond wrote:
>> "jmfbahciv" <See.above@aol.com> wrote in message
>> news:PM00052F07BAB82A98@aca41172.ipt.aol.com...
>>> Rod Speed wrote:
>>>>
>>>>
>>>> "jmfbahciv" <See.above@aol.com> wrote in message
>>>
>>> <snip>
>>>
>>>>> Reading code and determining when it's invoked (such as setting a bit
>>>>> for
>>>>> a score) can be complicated if it involves 3 conditions :-). IIRC,
>>>>> the point was set when a vase was placed on a pillow in a particular
>>>>> room. That's 3 conditions: the vase and pillow had to be acquired
>>>>> and then the room where they were to be placed had to be found.
>>>>
>>>> And that can't be done with JUST SET BREAK, whatever you claim.
>>>>
>>> Just because you can't do it does not mean that a TOPS-10 guru
>>> can't do it.
>>>
>>
>> Nothing works in Speedo's delusional world!
>>
>Frankly, I don't know how people debug these days without
>the SET WATCH FILE VERSION and SET BREAK command functionality.
People don't debug these days without "SET WATCH FILE" and "SET BREAK"
functionality, because every processor out there supports equivalent
capabilities.
Note that even Intel CPU's have had the equivalent of SET BREAK
for thirty+ years (they're called hardware breakpoints, and will
trigger when a particular instruction is executed, or when a particular
memory location is accessed or updated, depending on how the breakpoint
is configured).
Every debugger since the 70's on pretty much every CPU has had these
capabilities and many others. On Intel, for example, you can read from
the LBR (Last Branch Register) when you stop on a breakpoint to help
understand the flow leading up to the condition that caused the breakpoint
to trigger. PDP-10 didn't have an LBR.
Modern CPU's have extensive hardware debug capabilities (from JTAG at the lowest
level, to ETM on ARM, to OCLA[*] on Cavium processors).
[*] On-Chip Logic Analyzer
As for SET WATCH FILE, all that data is also available in modern operating
systems (in Linux, you can find it in the /proc/<pid> heirarchy or by
using the ltrace(1) or strace(1) or truss(1) commands).
E.g.
The 'strace' (or truss in SVR4) command will trace all interactions (UUO -> system call)
between the operating system (monitor to you) and the application
including synchronous and asynchronous events. You would use this to
implement "SET WATCH FILES" on any unix/linux system.
'ltrace' goes one better, and traces all interactions between the
application and any shared libraries it is using.
And the output is much friendlier than the output from .SET WATCH
e.g.
$ strace -e trace=open cat /etc/motd
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib64/libc.so.6", O_RDONLY) = 3
open("/etc/motd", O_RDONLY) = 3
This shows all the files opened by the command 'cat /etc/motd'.
Similarly, one could use this to trace adventure.
If you want to see what was read from where:
$ strace -e trace=open,read cat /etc/motd
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib64/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\356A'2\0\0\0"..., 832) = 832
open("/etc/motd", O_RDONLY) = 3
read(3, "", 32768) = 0
Then you also have source-level debug tools, such as gdb, which
even allow you to debug the operating system itself:
(gdb) thread 3
[Switching to thread 3 (Thread 3)]
#0 __raw_spin_lock_irqsave (lock=<optimized out>) at include/linux/spinlock_api_smp.h:109
109 preempt_disable();
(gdb) bt
#0 __raw_spin_lock_irqsave (lock=<optimized out>) at include/linux/spinlock_api_smp.h:109
#1 _raw_spin_lock_irqsave (lock=0xfffffe00007cb100 <simple_ida_lock>) at kernel/locking/spinlock.c:159
#2 0xfffffe000031c754 in ida_simple_get (ida=0xfffffe0340024f10, start=0x0, end=<optimized out>, gfp_mask=0x1)
at lib/idr.c:1100
#3 0xfffffe00001ec558 in __kernfs_new_node (root=0xfffffe0340024f00, name=0x0, mode=0x8124, flags=0x1)
at fs/kernfs/dir.c:519
#4 0xfffffe00001ed5bc in kernfs_new_node (parent=0xfffffe0342189858, name=<optimized out>, mode=<optimized out>,
flags=<optimized out>) at fs/kernfs/dir.c:547
#5 0xfffffe00001eedc4 in __kernfs_create_file (parent=<optimized out>, name=<optimized out>, mode=<optimized out>,
size=0x10000, ops=<optimized out>, priv=<optimized out>, ns=<optimized out>, name_is_static=<optimized out>, key=0x0)
at fs/kernfs/file.c:920
#6 0xfffffe00001ef65c in sysfs_add_file_mode_ns (parent=0xfffffe0342189858,
attr=0xfffffe0000761028 <dev_attr_dma_mask_bits>, is_bin=<optimized out>, mode=<optimized out>, ns=<optimized out>)
at fs/sysfs/file.c:256
#7 0xfffffe00001f0380 in create_files (update=<optimized out>, grp=<optimized out>, kobj=<optimized out>,
parent=<optimized out>) at fs/sysfs/group.c:58
#8 internal_create_group (kobj=0xfffffe00007cb100 <simple_ida_lock>, update=0x0, grp=0xfffffe0000551fb8 <pci_dev_group>)
at fs/sysfs/group.c:116
#9 0xfffffe00001f0544 in sysfs_create_group (kobj=<optimized out>, grp=<optimized out>) at fs/sysfs/group.c:138
#10 0xfffffe00001f0684 in sysfs_create_groups (kobj=0xfffffe0064c388a8, groups=0x0) at fs/sysfs/group.c:165
#11 0xfffffe00003aa8d8 in device_add_groups (dev=<optimized out>, groups=<optimized out>) at drivers/base/core.c:459
#12 0xfffffe00003acfac in bus_add_device (dev=0xfffffe0064c38898) at drivers/base/bus.c:514
#13 0xfffffe00003ab294 in device_add (dev=0xfffffe0064c38898) at drivers/base/core.c:1042
#14 0xfffffe0000346d54 in pci_device_add (dev=0xfffffe0064c38800, bus=0xfffffe034120cc00) at drivers/pci/probe.c:1562
#15 0xfffffe0000346e2c in pci_scan_single_device (devfn=<optimized out>, bus=<optimized out>) at drivers/pci/probe.c:1580
#16 pci_scan_single_device (bus=0xfffffe034120cc00, devfn=0x0) at drivers/pci/probe.c:1566
#17 0xfffffe0000346ea4 in pci_scan_slot (devfn=<optimized out>, bus=<optimized out>) at drivers/pci/probe.c:1647
#18 pci_scan_slot (bus=0xfffffe034120cc00, devfn=0x0) at drivers/pci/probe.c:1639
#19 0xfffffe0000347db4 in pci_scan_child_bus (bus=0xfffffe00007cb100 <simple_ida_lock>) at drivers/pci/probe.c:1849
#20 0xfffffe0000347a2c in pci_scan_bridge (bus=0xfffffe034120c000, dev=0xfffffe006407c000, max=0x2, pass=<optimized out>)
at drivers/pci/probe.c:838
#21 0xfffffe0000347e1c in pci_scan_child_bus (bus=0xfffffe00007cb100 <simple_ida_lock>) at drivers/pci/probe.c:1867
#22 0xfffffe0000360ee8 in thunder_pcie_probe (pdev=0xfffffe0341210c00) at drivers/pci/host/pcie-thunder.c:625
#23 0xfffffe00003af3e4 in platform_drv_probe (_dev=0xfffffe0341210c10) at drivers/base/platform.c:512
#24 0xfffffe00003adb88 in really_probe (drv=<optimized out>, dev=<optimized out>) at drivers/base/dd.c:306
#25 driver_probe_device (drv=0xfffffe00007616e0 <thunder_pcie_driver+40>, dev=0xfffffe0341210c10) at drivers/base/dd.c:399
#26 0xfffffe00003adddc in __driver_attach (data=<optimized out>, dev=<optimized out>) at drivers/base/dd.c:477
#27 __driver_attach (dev=0xfffffe0341210c10, data=0xfffffe00007616e0 <thunder_pcie_driver+40>) at drivers/base/dd.c:456
#28 0xfffffe00003ac118 in bus_for_each_dev (bus=<optimized out>, start=<optimized out>, data=0x1, fn=0x1)
at drivers/base/bus.c:311
#29 0xfffffe00003ad6b0 in driver_attach (drv=<optimized out>) at drivers/base/dd.c:496
#30 0xfffffe00003ad340 in bus_add_driver (drv=0xfffffe00007616e0 <thunder_pcie_driver+40>) at drivers/base/bus.c:692
#31 0xfffffe00003ae500 in driver_register (drv=0xfffffe00007616e0 <thunder_pcie_driver+40>) at drivers/base/driver.c:167
#32 0xfffffe00003af25c in __platform_driver_register (drv=<optimized out>, owner=<optimized out>)
at drivers/base/platform.c:568
#33 0xfffffe00006d8e78 in thunder_pcie_driver_init () at drivers/pci/host/pcie-thunder.c:652
#34 0xfffffe000009050c in do_one_initcall (fn=0xfffffe00006d8e60 <thunder_pcie_driver_init>) at init/main.c:791
#35 0xfffffe00006c0abc in do_initcall_level (level=<optimized out>) at init/main.c:856
#36 do_initcalls () at init/main.c:864
#37 do_basic_setup () at init/main.c:883
#38 kernel_init_freeable () at init/main.c:1004
#39 0xfffffe00004ed690 in kernel_init (unused=<optimized out>) at init/main.c:934
#40 0xfffffe00000931e0 in ret_from_fork () at arch/arm64/kernel/entry.S:640
Back to alt.folklore.computers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-19 13:23 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-20 06:46 +1100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-20 13:56 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-21 04:51 +1100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-21 12:24 +0000
Re: Debugging Adventure using Address Break Morten Reistad <first@last.name.invalid> - 2016-03-21 13:53 +0100
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-22 04:23 +1100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-22 13:40 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-23 05:01 +1100
Re: Debugging Adventure using Address Break Rob Doyle <radioengr@gmail.com> - 2016-03-22 01:50 -0700
Re: Debugging Adventure using Address Break Morten Reistad <first@last.name.invalid> - 2016-03-22 13:22 +0100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-22 13:40 +0000
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-22 13:40 +0000
Re: Debugging Adventure using Address Break usenet@only.tnx (Questor) - 2016-03-26 07:32 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-22 04:24 +1100
Re: Debugging Adventure using Address Break "Charles Richmond" <numerist@aquaporin4.com> - 2016-03-22 10:20 -0500
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-23 13:23 +0000
Re: Debugging Adventure using Address Break scott@slp53.sl.home (Scott Lurndal) - 2016-03-21 13:58 +0000
Re: Debugging Adventure using Address Break scott@slp53.sl.home (Scott Lurndal) - 2016-03-21 14:00 +0000
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-22 13:40 +0000
Re: Debugging Adventure using Address Break "Charles Richmond" <numerist@aquaporin4.com> - 2016-03-22 10:24 -0500
Re: Debugging Adventure using Address Break usenet@only.tnx (Questor) - 2016-03-22 07:19 +0000
Re: Debugging Adventure using Address Break usenet@only.tnx (Questor) - 2016-03-22 07:19 +0000
Re: Debugging Adventure using Address Break Morten Reistad <first@last.name.invalid> - 2016-03-22 13:20 +0100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-22 13:40 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-23 04:55 +1100
Re: Debugging Adventure using Address Break usenet@only.tnx (Questor) - 2016-03-26 07:32 +0000
Re: Debugging Adventure using Address Break Morten Reistad <first@last.name.invalid> - 2016-03-26 09:55 +0100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-26 13:24 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-27 04:11 +1100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-27 13:26 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-28 04:25 +1100
Re: Debugging Adventure using Address Break "Charles Richmond" <numerist@aquaporin4.com> - 2016-03-28 15:58 -0500
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-29 13:55 +0000
Re: Debugging Adventure using Address Break Morten Reistad <first@last.name.invalid> - 2016-03-29 17:17 +0200
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-30 13:58 +0000
Re: Debugging Adventure using Address Break scott@slp53.sl.home (Scott Lurndal) - 2016-03-29 16:17 +0000
Re: Debugging Adventure using Address Break Ahem A Rivet's Shot <steveo@eircom.net> - 2016-03-29 17:57 +0100
Re: Debugging Adventure using Address Break Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2016-03-29 17:14 +0000
Re: Debugging Adventure using Address Break Huge <Huge@nowhere.much.invalid> - 2016-03-29 17:17 +0000
Re: Debugging Adventure using Address Break scott@slp53.sl.home (Scott Lurndal) - 2016-03-29 17:48 +0000
Re: Debugging Adventure using Address Break Ibmekon <Ibmekon> - 2016-03-29 21:35 +0100
Re: Debugging Adventure using Address Break Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2016-03-29 23:20 +0000
Re: Debugging Adventure using Address Break Andrew Swallow <am.swallow@btopenworld.com> - 2016-03-30 05:33 +0100
Re: Debugging Adventure using Address Break "764hho" <764hho@nospam.com> - 2016-03-30 17:23 +1100
Re: Debugging Adventure using Address Break Ibmekon <Ibmekon> - 2016-03-29 19:28 +0100
Re: Debugging Adventure using Address Break "Charles Richmond" <numerist@aquaporin4.com> - 2016-03-31 11:10 -0500
Re: Debugging Adventure using Address Break Ibmekon <Ibmekon> - 2016-03-31 19:20 +0100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-30 13:58 +0000
Re: Debugging Adventure using Address Break Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2016-03-30 16:32 +0000
Re: Debugging Adventure using Address Break scott@slp53.sl.home (Scott Lurndal) - 2016-03-30 16:55 +0000
Re: Debugging Adventure using Address Break "764hho" <764hho@nospam.com> - 2016-03-31 04:09 +1100
Re: Debugging Adventure using Address Break Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2016-03-31 06:22 +0000
Re: Debugging Adventure using Address Break "Charles Richmond" <numerist@aquaporin4.com> - 2016-03-31 11:13 -0500
Re: Debugging Adventure using Address Break JimP. <blue@cwahi.net> - 2016-03-31 21:00 -0500
Re: Debugging Adventure using Address Break "764hho" <764hho@nospam.com> - 2016-03-31 03:49 +1100
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-30 05:29 +1100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-30 13:58 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-03-31 03:41 +1100
Re: Debugging Adventure using Address Break jmfbahciv <See.above@aol.com> - 2016-03-31 12:41 +0000
Re: Debugging Adventure using Address Break "Rod Speed" <rod.speed.aaa@gmail.com> - 2016-04-01 05:03 +1100
Re: Debugging Adventure using Address Break usenet@only.tnx (Questor) - 2016-04-15 08:34 +0000
csiph-web