[patchv2] compile: Fix GNU-IFUNC funcs called from injected code

Message ID 20150226105435.GA2828@host1.jankratochvil.net
State New, archived
Headers

Commit Message

Jan Kratochvil Feb. 26, 2015, 10:54 a.m. UTC
  On Thu, 26 Feb 2015 10:34:03 +0100, Joel Brobecker wrote:
> As one of the authors of this patch, can you fix those, please?
> (obvious fix, master and gdb-7.9-branch - remember that we need
> a PR for fixes pushed to the branch)

Done, also in the 7.9 branch.

Used your PR, only now I read I should have probably used a new one.


Jan
---
 gdb/compile/compile-c-support.c   | 2 +-
 gdb/compile/compile-object-load.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Joel Brobecker Feb. 26, 2015, 3:16 p.m. UTC | #1
> > As one of the authors of this patch, can you fix those, please?
> > (obvious fix, master and gdb-7.9-branch - remember that we need
> > a PR for fixes pushed to the branch)
> 
> Done, also in the 7.9 branch.
> 
> Used your PR, only now I read I should have probably used a new one.

Thank you! It's OK about the PR - I just change its subject
to match both.
  

Patch

diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c
index 8f1f45d..1711cda 100644
--- a/gdb/compile/compile-c-support.c
+++ b/gdb/compile/compile-c-support.c
@@ -351,7 +351,7 @@  c_compute_program (struct compile_instance *inst,
 			" __gdb_intptr;\n",
 			buf);
 
-      // Iterate all log2 sizes in bytes supported by c_get_mode_for_size.
+      /* Iterate all log2 sizes in bytes supported by c_get_mode_for_size.  */
       for (i = 0; i < 4; ++i)
 	{
 	  const char *mode = c_get_mode_for_size (1 << i);
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index 5903f18..e187970 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -67,7 +67,7 @@  setup_sections (bfd *abfd, asection *sect, void *data_voidp)
       if ((bfd_get_section_flags (abfd, sect) & SEC_ALLOC) == 0)
 	return;
 
-      // Make the memory always readable.
+      /* Make the memory always readable.  */
       prot = GDB_MMAP_PROT_READ;
       if ((bfd_get_section_flags (abfd, sect) & SEC_READONLY) == 0)
 	prot |= GDB_MMAP_PROT_WRITE;