[Lldb-commits] [PATCH] Fetch object file load address if it isn't specified by the linker

Aidan Dodds aidan.dodds at googlemail.com
Wed Jun 17 07:05:01 PDT 2015


I added a few inlined comments, but overall this looks good to me.


================
Comment at: docs/lldb-gdb-remote.txt:1001
@@ +1000,3 @@
+//  "FFFFFFFFFFFFFFFF": ((uint64_t)(-1)) The requested file isn't loaded
+//  "EXX" - for any errors
+//
----------------
labath wrote:
> I know F..F is not likely to be a valid load address, but what do you think about using one of the error codes to signify this condition? If it is not too much of a trouble to implement it, it sounds like a more reasonable solution.
An error code sounds good to me too as its less ambigous.

================
Comment at: source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp:415
@@ +414,3 @@
+    if (entry.base_addr == 0)
+    {
+        lldb::addr_t load_addr = LLDB_INVALID_ADDRESS;
----------------
On some targets 0 can be a valid load address (Hexagon for example).  I dont think this will cause problems in that case, as the call to GetFileLoadAddress() should return 0 in that case.  But if your changing this peice of code it may be good to keep in mind.

http://reviews.llvm.org/D10490

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list