compnerd / ds2

Debug server for lldb.
https://compnerd.github.io/ds2/
University of Illinois/NCSA Open Source License
11 stars 3 forks source link

return md5 hash of executable file in the `qModuleInfo` response when no build ID is available #126

Open andrurogerz opened 2 months ago

andrurogerz commented 2 months ago

The response to qModuleInfo contains the executable file's embedded build ID as a "uuid" field. For executable files that don't have a build ID, calculate an md5 hash of the file, contents and return that as an "md5" field instead of the "uuid" field.

https://github.com/compnerd/ds2/blob/6c269217da706efc3db9c6e04245c62dc4d35ac8/Sources/GDBRemote/Mixins/FileOperationsMixin.hpp#L104-L115

Also consider implementing support for vFile:MD5 in Session::Handle_vFile since it could reuse the same implementation.

andrurogerz commented 1 month ago

I tried adding this implementation here but it breaks some of the lldb tests when run on Linux (not Android). Needs further investigation.