PDA

View Full Version : How to set breakpoint for reading USB in linux?


jiahugh
July 23rd, 2007, 20:19
Hi, all,

I'm debugging a program which uses flex1m 8.1 and gets the hostid from a USB dongle. I can find the seeds now and the daemon can start with the hostid of mac address. But the application wants to read the USB so the license can't be checked out. I tried to set a break before the app reading the USB, but I can't find out the right place.

Can anyone tell me how to set the breakpoint when the app reading the USB just like the bpio in Olly?

Many thanks,

hugh

FrankRizzo
July 25th, 2007, 19:03
I'd think it would really depend on how they're reading it. If it's a "normal" USB device, they could be just talking to the normal drivers, in which case it would be just an open, or an fopen, in which case you could search through your IDA listing for instances of those 2 functions, and set breakpoints on them. If they are doing their own access to the ports, through INs and OUTs, those would be a little harder, but I would avoid that bridge until I had to cross it. So, check for the opens, and let us know if those don't work.

LLXX
August 6th, 2007, 02:52
A USB interface is completely different from a parallel port.

Communication with the host controller is via memory-mapped-I/O. In addition, it is done through a U/OHCI controller interface layer.

The USB specifications are open, so I recommend you give them a good read.