You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024-05-22 18:25:11 allenwind FabricAdmin[364405] WARNING Allocating new controller with CaIndex: 1, FabricId: 0x0000000000000001, NodeId: 0x000000000001B669, CatTags: []
164
+
165
+
166
+
The following objects have been created:
167
+
certificateAuthorityManager: Manages a list of CertificateAuthority instances.
168
+
caList: The list of CertificateAuthority instances.
169
+
caList: A specific FabricAdmin object at index m for the nth CertificateAuthority instance.
137
170
138
-
chip-device-ctrl >
171
+
172
+
Default CHIP Device Controller (NodeId: 112233): has been initialized to manage caList[0].adminList[0] (FabricId = 1), and is available as devCtrl
173
+
174
+
In [1]:
139
175
```
140
176
141
-
The prompt `chip-device-ctrl >` indicates that the Matter core library is loaded
142
-
by Python, you can browse the symbols in the Matter core library, setting
143
-
breakpoints on functions and many other functions provided by GDB.
177
+
The prompt `In [1]: ` indicates that the Matter SDK library has been loaded and
178
+
initialized by the Python Controller REPL, you can browse the symbols in the
179
+
Matter core library, setting breakpoints on functions and many other functions
180
+
provided by GDB.
144
181
145
-
You can use `Ctrl-C` to send SIGINT to the controller anytime you want so you
146
-
can set breakpoints.
182
+
You can use `Ctrl-Z` to send SIGSTP to the Python 3 REPL process anytime you
183
+
want so you can set breakpoints (unfortunately Ctrl+C seems to be captured by
184
+
the REPL).
147
185
148
-
> (`Ctrl-C` pressed here.)
186
+
In [1]: (`Ctrl-Z` pressed here.)
149
187
150
188
```
151
-
Thread 1 "python3" received signal SIGINT, Interrupt.
152
-
0x0000fffff7db79ec in __GI___select (nfds=<optimizedout>, readfds=0xffffffffe760, writefds=0x0, exceptfds=0x0, timeout=<optimizedout>) at ../sysdeps/unix/sysv/linux/select.c:49
153
-
49 ../sysdeps/unix/sysv/linux/select.c: No such file or directory.
189
+
Thread 1 "python3" received signal SIGTSTP, Stopped (user).
190
+
0x00007ffff7650ceb in kill () from /usr/lib/libc.so.6
154
191
(gdb)
155
192
```
156
193
@@ -159,40 +196,27 @@ command in GDB (`b` for short)
159
196
160
197
```
161
198
(gdb) b DeviceCommissioner::PairDevice
162
-
Breakpoint 1 at 0xfffff5b0f6b4 (2 locations)
199
+
Breakpoint 1 at 0x7fffed453943: DeviceCommissioner::PairDevice. (4 locations)
163
200
(gdb)
164
201
```
165
202
166
-
Type `continue` (`c` for short) to continue the device controller, you may need
167
-
another hit of `Enter` to see the prompt.
203
+
Type `signal SIGCONT` to continue the device controller after stopping it with
204
+
signal stop, you may need another hit of `Enter` to see the prompt.
168
205
169
206
```
170
-
(gdb) c
171
-
Continuing.
172
-
173
-
chip-device-ctrl >
207
+
(gdb) signal SIGCONT
208
+
Continuing with signal SIGCONT.
209
+
In [1]:
174
210
```
175
211
176
212
Let do pairing over IP to see the effect of the breakpoint we just set.
at ../../src/controller/CHIPDeviceController.cpp:646
232
+
#1 0x00007fffed040825 in pychip_DeviceController_ConnectWithCode (devCtrl=0x7fffd8003a90, onboardingPayload=0x7fffef2555d0 "MT:-24J0AFN00KA0648G00", nodeid=1234, discoveryType=2 '\002')
233
+
at ../../src/controller/python/ChipDeviceController-ScriptBinding.cpp:395
234
+
#2 0x00007ffff6ad5596 in ??? () at /usr/lib/libffi.so.8
235
+
#3 0x00007ffff6ad200e in ??? () at /usr/lib/libffi.so.8
236
+
#4 0x00007ffff6ad4bd3 in ffi_call () at /usr/lib/libffi.so.8
237
+
#5 0x00007ffff6aeaffc in ??? () at /usr/lib/python3.11/lib-dynload/_ctypes.cpython-311-x86_64-linux-gnu.so
238
+
#6 0x00007ffff6aeb4b4 in ??? () at /usr/lib/python3.11/lib-dynload/_ctypes.cpython-311-x86_64-linux-gnu.so
239
+
#7 0x00007ffff794a618 in _PyObject_MakeTpCall () at /usr/lib/libpython3.11.so.1.0
240
+
#8 0x00007ffff78f3d03 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.11.so.1.0
241
+
#9 0x00007ffff7adef90 in ??? () at /usr/lib/libpython3.11.so.1.0
242
+
#10 0x00007ffff79ebc0b in _PyObject_FastCallDictTstate () at /usr/lib/libpython3.11.so.1.0
243
+
#11 0x00007ffff79ebe02 in _PyObject_Call_Prepend () at /usr/lib/libpython3.11.so.1.0
244
+
#12 0x00007ffff79ec114 in ??? () at /usr/lib/libpython3.11.so.1.0
245
+
#13 0x00007ffff794a618 in _PyObject_MakeTpCall () at /usr/lib/libpython3.11.so.1.0
246
+
#14 0x00007ffff78f3d03 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.11.so.1.0
247
+
#15 0x00007ffff7adef90 in ??? () at /usr/lib/libpython3.11.so.1.0
248
+
#16 0x00007ffff7955b97 in PyObject_Vectorcall () at /usr/lib/libpython3.11.so.1.0
249
+
#17 0x00007ffff6aea174 in ??? () at /usr/lib/python3.11/lib-dynload/_ctypes.cpython-311-x86_64-linux-gnu.so
250
+
#18 0x00007ffff6aea28c in ??? () at /usr/lib/python3.11/lib-dynload/_ctypes.cpython-311-x86_64-linux-gnu.so
251
+
#19 0x00007ffff6ad5152 in ??? () at /usr/lib/libffi.so.8
252
+
#20 0x00007ffff6ad57b8 in ??? () at /usr/lib/libffi.so.8
253
+
#21 0x00007fffed5de848 in chip::DeviceLayer::Internal::GenericPlatformManagerImpl<chip::DeviceLayer::PlatformManagerImpl>::_DispatchEvent
254
+
(this=0x7fffed88dc90 <chip::DeviceLayer::PlatformManagerImpl::sInstance+16>, event=0x7fffe6fffe30) at ../../src/include/platform/internal/GenericPlatformManagerImpl.ipp:304
255
+
#22 0x00007fffed5dd90d in chip::DeviceLayer::PlatformManager::DispatchEvent (this=0x7fffed88dc80 <chip::DeviceLayer::PlatformManagerImpl::sInstance>, event=0x7fffe6fffe30) at ../../src/include/platform/PlatformManager.h:503
256
+
#23 0x00007fffed5df45b in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::ProcessDeviceEvents
257
+
(this=0x7fffed88dc90 <chip::DeviceLayer::PlatformManagerImpl::sInstance+16>) at ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:185
258
+
#24 0x00007fffed5dee64 in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::_RunEventLoop (this=0x7fffed88dc90 <chip::DeviceLayer::PlatformManagerImpl::sInstance+16>)
259
+
--Type <RET> for more, q to quit, c to continue without paging--
260
+
at ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:227
261
+
#25 0x00007fffed5dd888 in chip::DeviceLayer::PlatformManager::RunEventLoop (this=0x7fffed88dc80 <chip::DeviceLayer::PlatformManagerImpl::sInstance>) at ../../src/include/platform/PlatformManager.h:403
262
+
#26 0x00007fffed5df3fe in chip::DeviceLayer::Internal::GenericPlatformManagerImpl_POSIX<chip::DeviceLayer::PlatformManagerImpl>::EventLoopTaskMain (arg=0x7fffed88dc90 <chip::DeviceLayer::PlatformManagerImpl::sInstance+16>)
263
+
at ../../src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp:256
264
+
#27 0x00007ffff76a6ded in ??? () at /usr/lib/libc.so.6
265
+
#28 0x00007ffff772a0dc in ??? () at /usr/lib/libc.so.6
0 commit comments