This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch 2/4] unwinder: Provide EBLHOOKVAR


Hi,

dependent on:
	[patch 1/4] unwinder: New base address based dwfl_report_elf_baseaddr

present in:
	jankratochvil/forunwind-baseaddr-hookvars
but this branch is not suitable for merge as it is unclear in which form get
checked in the patches above.  The branch is usable only for "git checkout",
neither diff nor merge should be done on it.


Currently EBL backends support functions via EBLHOOK.  Providing variables is
done via a function returning value such as via current x86_64_register_info.
I find it needlessly complicated, backends can provide also
variables/constants.

I can sure easily rework the remaining patches if I really should use a
function doing nothing else than returning a number.


Thanks,
Jan


backends/
2012-11-13  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* libebl_CPU.h (EBLHOOKVAR): New definition.
	* libeblP.h (EBLHOOKVAR): New definition and its new undef.

diff --git a/backends/libebl_CPU.h b/backends/libebl_CPU.h
index 36b3a4a..65a9a13 100644
--- a/backends/libebl_CPU.h
+++ b/backends/libebl_CPU.h
@@ -32,6 +32,7 @@
 #include <libeblP.h>
 
 #define EBLHOOK(name)	EBLHOOK_1(BACKEND, name)
+#define EBLHOOKVAR	EBLHOOK
 #define EBLHOOK_1(a, b)	EBLHOOK_2(a, b)
 #define EBLHOOK_2(a, b)	a##b
 
diff --git a/libebl/libeblP.h b/libebl/libeblP.h
index c8196bd..773b6b8 100644
--- a/libebl/libeblP.h
+++ b/libebl/libeblP.h
@@ -54,7 +54,9 @@ struct ebl
 
   /* See ebl-hooks.h for the declarations of the hook functions.  */
 # define EBLHOOK(name) (*name)
+# define EBLHOOKVAR(name) (name)
 # include "ebl-hooks.h"
+# undef EBLHOOKVAR
 # undef EBLHOOK
 
   /* Size of entry in Sysv-style hash table.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]