Closed
Bug 904646
Opened 13 years ago
Closed 13 years ago
GDB doesn't see shared libraries from custom linker on Android 4.3
Categories
(Core :: mozglue, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: jchen, Assigned: jchen)
Details
Attachments
(1 file, 1 obsolete file)
|
1.70 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
On Android 4.3, the envp/auxv stack layout is slightly different: there are two NULLs between the envp pointers and the auxv pointers. As a result, the custom linker fails to insert its shared libraries into the DT_DEBUG list, and GDB doesn't see them.
| Assignee | ||
Comment 1•13 years ago
|
||
This patch fixes the bug for me.
Attachment #789619 -
Flags: review?(mh+mozilla)
Comment 2•13 years ago
|
||
Comment on attachment 789619 [details] [diff] [review]
Skip second NULL when traversing envp/auxv pointers to let GDB work on Android 4.3 (v1)
Review of attachment 789619 [details] [diff] [review]:
-----------------------------------------------------------------
::: mozglue/linker/ElfLoader.cpp
@@ +589,5 @@
> * thus the first auxiliary vector. */
> while (*scan++);
> +
> + /* Some platforms have a second NULL here, so skip it if we encounter it */
> + if (!*scan)
How about while(!*scan++); ? (in case we end up with even more NULLs)
Attachment #789619 -
Flags: review?(mh+mozilla) → feedback+
| Assignee | ||
Comment 3•13 years ago
|
||
Okay, this will skip over all NUlls (if any).
Attachment #789619 -
Attachment is obsolete: true
Attachment #790268 -
Flags: review?(mh+mozilla)
Updated•13 years ago
|
Attachment #790268 -
Flags: review?(mh+mozilla) → review+
| Assignee | ||
Comment 4•13 years ago
|
||
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•