Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Add comments to gdbarch_address_class_name_to_type_flags
@ 2014-01-16 18:47 Simon Marchi
  2014-01-16 19:11 ` Pedro Alves
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Marchi @ 2014-01-16 18:47 UTC (permalink / raw)
  To: GDB Patches

gdb/ChangeLog
2014-01-16  Simon Marchi  <simon.marchi@ericsson.com>

	* gdbarch.sh (gdbarch_address_class_name_to_type_flags): Add
	comments.
	* gdbarch.h: Regenerate.

diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 6b59371..20662b3 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -694,6 +694,13 @@ typedef const char * (gdbarch_address_class_type_flags_to_name_ftype) (struct gd
 extern const char * gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags);
 extern void set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name);

+/* Return the appropriate type_flags for the supplied address class.
+   This function should return 1 if the address class was recognized and
+   type_flags was set, zero otherwise.
+   No assumption should be made about the initial value of *type_flags_ptr,
+   which means that if it returns 1, the function should write it, even if
+   no flags are set. */
+
 extern int gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch);

 typedef int (gdbarch_address_class_name_to_type_flags_ftype) (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 9c1229e..6aa6d2c 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -628,6 +628,13 @@ v:int:cannot_step_breakpoint:::0:0::0
 v:int:have_nonsteppable_watchpoint:::0:0::0
 F:int:address_class_type_flags:int byte_size, int dwarf2_addr_class:byte_size, dwarf2_addr_class
 M:const char *:address_class_type_flags_to_name:int type_flags:type_flags
+
+# Return the appropriate type_flags for the supplied address class.
+# This function should return 1 if the address class was recognized and
+# type_flags was set, zero otherwise.
+# No assumption should be made about the initial value of *type_flags_ptr,
+# which means that if it returns 1, the function should write it, even if
+# no flags are set.
 M:int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr
 # Is a register in a group
 m:int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup::default_register_reggroup_p::0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-16 20:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-16 18:47 [PATCH] Add comments to gdbarch_address_class_name_to_type_flags Simon Marchi
2014-01-16 19:11 ` Pedro Alves
2014-01-16 19:21   ` Sergio Durigan Junior
2014-01-16 19:26     ` Pedro Alves
2014-01-16 19:32       ` Simon Marchi
2014-01-16 19:45         ` Sergio Durigan Junior
2014-01-16 19:58           ` Pedro Alves
2014-01-16 20:12             ` Tom Tromey
2014-01-16 19:31   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox