将 gdb 与 termux-usb 结合使用的正确语法是什么?

问题描述 投票:0回答:1

我正在使用 libusb 库用 C 语言编写一个程序,以使 Android 手机能够与 USB 设备进行通信。

C 程序在手机上的 termux 模拟器中运行。它使用 termux-usb 使 USB 设备对 C 程序可见,如下所示:

>termux-usb -l
>termux-usb -r /dev/bus/usb/001/002
>termux-usb -e ./program /dev/bus/usb/001/002

如果我想使用 gdb 和 termux-usb 一起运行和调试程序,正确的语法是什么?

我尝试过 gdb --args 和 termux-usb -e 的各种组合,但没有一个能识别 /dev/bus/usb/001/002 参数。

android c gdb libusb termux
1个回答
0
投票

也许:gdb | termux-usb 或 termux-usb |数据库 例如,如果您仅使用 url 而没有参数运行curl,它将写入终端,但是如果您运行curl [url] |猫 < a, it will write to the file "a"

© www.soinside.com 2019 - 2024. All rights reserved.