Fix auxv data parsing on 64-bit solaris

* target.h (struct target_ops): New field to_auxv_parse.
	* auxv.c (default_auxv_parse): New, renamed from previous
	target_auxv_parse.
	(target_auxv_parse): Try to call target method.  Fallback to
	default_auxv_parse if not found.
	* procfs.c (procfs_auxv_parse): New.
	(init_procfs_ops): On Solaris, in 64-bit mode, install
	procfs_auxv_parse.
This commit is contained in:
Vladimir Prus
2008-05-04 09:28:27 +00:00
parent 55cd6f92dc
commit c47ffbe3b1
4 changed files with 69 additions and 1 deletions

View File

@ -498,6 +498,13 @@ struct target_ops
was available. */
const struct target_desc *(*to_read_description) (struct target_ops *ops);
/* Read one auxv entry from *READPTR, not reading locations >= ENDPTR.
Return 0 if *READPTR is already at the end of the buffer.
Return -1 if there is insufficient buffer for a whole entry.
Return 1 if an entry was read into *TYPEP and *VALP. */
int (*to_auxv_parse) (struct target_ops *ops, gdb_byte **readptr,
gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp);
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/