[Lldb-commits] [PATCH] PECOFF
Greg Clayton
gclayton at apple.com
Fri Aug 23 11:33:08 PDT 2013
Actually this one is not correct. The m_file_offset is the offset of the PECOFF file within the file itself. So m_file_offset should be zero for all files that aren't in containers (like universal files on Darwin that contain multiple architecture slices, or .o files within a BSD archive (.a file)).
On Aug 23, 2013, at 10:10 AM, Virgile Bello <virgile.bello at gmail.com> wrote:
> File offset is not set properly in PECOFF.
>
> http://llvm-reviews.chandlerc.com/D1488
>
> Files:
> source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
>
> Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
> ===================================================================
> --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
> +++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
> @@ -434,6 +434,8 @@
> m_coff_header_opt.data_dirs[i].vmaddr = m_data.GetU32(offset_ptr);
> m_coff_header_opt.data_dirs[i].vmsize = m_data.GetU32(offset_ptr);
> }
> +
> + m_file_offset = m_coff_header_opt.image_base;
> }
> }
> }
> <D1488.1.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list