core_xfer_shared_libraries and core_xfer_shared_libraries_aix returns ULONGEST
This patch documents the return value of core_xfer_shared_libraries_aix and core_xfer_shared_libraries gdbarch methods, and changes return type to ULONGEST from LONGEST. In a following patch, core_xfer_partial. is changed to check their return values and return an appropriate target_xfer_status. gdb: 2014-02-07 Yao Qi <yao@codesourcery.com> * gdbarch.sh (core_xfer_shared_libraries): Returns ULONGEST. Add comments. (core_xfer_shared_libraries_aix): Likewise. * gdbarch.c, gdbarch.h: Regenerated. * i386-cygwin-tdep.c (windows_core_xfer_shared_libraries): Return ULONGEST. Change 'len_avail' type to ULONGEST. * rs6000-aix-tdep.c (rs6000_aix_ld_info_to_xml): Likewise. * rs6000-aix-tdep.h (rs6000_aix_ld_info_to_xml): Update declaration. (rs6000_aix_core_xfer_shared_libraries_aix): Return ULONGEST.
This commit is contained in:
parent
8635b3bf59
commit
c09f20e469
@ -1,3 +1,16 @@
|
|||||||
|
2014-02-07 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* gdbarch.sh (core_xfer_shared_libraries): Returns ULONGEST. Add
|
||||||
|
comments.
|
||||||
|
(core_xfer_shared_libraries_aix): Likewise.
|
||||||
|
* gdbarch.c, gdbarch.h: Regenerated.
|
||||||
|
* i386-cygwin-tdep.c (windows_core_xfer_shared_libraries): Return
|
||||||
|
ULONGEST. Change 'len_avail' type to ULONGEST.
|
||||||
|
* rs6000-aix-tdep.c (rs6000_aix_ld_info_to_xml): Likewise.
|
||||||
|
* rs6000-aix-tdep.h (rs6000_aix_ld_info_to_xml): Update
|
||||||
|
declaration.
|
||||||
|
(rs6000_aix_core_xfer_shared_libraries_aix): Return ULONGEST.
|
||||||
|
|
||||||
2014-02-07 Yao Qi <yao@codesourcery.com>
|
2014-02-07 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
* corefile.c (memory_error): Get 'exception' from ERR and pass
|
* corefile.c (memory_error): Get 'exception' from ERR and pass
|
||||||
|
@ -3532,7 +3532,7 @@ gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch)
|
|||||||
return gdbarch->core_xfer_shared_libraries != NULL;
|
return gdbarch->core_xfer_shared_libraries != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LONGEST
|
ULONGEST
|
||||||
gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
|
gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
|
||||||
{
|
{
|
||||||
gdb_assert (gdbarch != NULL);
|
gdb_assert (gdbarch != NULL);
|
||||||
@ -3556,7 +3556,7 @@ gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch)
|
|||||||
return gdbarch->core_xfer_shared_libraries_aix != NULL;
|
return gdbarch->core_xfer_shared_libraries_aix != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LONGEST
|
ULONGEST
|
||||||
gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
|
gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
|
||||||
{
|
{
|
||||||
gdb_assert (gdbarch != NULL);
|
gdb_assert (gdbarch != NULL);
|
||||||
|
@ -779,21 +779,24 @@ extern int gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_reg
|
|||||||
extern void set_gdbarch_find_memory_regions (struct gdbarch *gdbarch, gdbarch_find_memory_regions_ftype *find_memory_regions);
|
extern void set_gdbarch_find_memory_regions (struct gdbarch *gdbarch, gdbarch_find_memory_regions_ftype *find_memory_regions);
|
||||||
|
|
||||||
/* Read offset OFFSET of TARGET_OBJECT_LIBRARIES formatted shared libraries list from
|
/* Read offset OFFSET of TARGET_OBJECT_LIBRARIES formatted shared libraries list from
|
||||||
core file into buffer READBUF with length LEN. */
|
core file into buffer READBUF with length LEN. Return the number of bytes read
|
||||||
|
(zero indicates failure).
|
||||||
|
failed, otherwise, return the red length of READBUF. */
|
||||||
|
|
||||||
extern int gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch);
|
extern int gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch);
|
||||||
|
|
||||||
typedef LONGEST (gdbarch_core_xfer_shared_libraries_ftype) (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
typedef ULONGEST (gdbarch_core_xfer_shared_libraries_ftype) (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
||||||
extern LONGEST gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
extern ULONGEST gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
||||||
extern void set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries);
|
extern void set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries);
|
||||||
|
|
||||||
/* Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared
|
/* Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared
|
||||||
libraries list from core file into buffer READBUF with length LEN. */
|
libraries list from core file into buffer READBUF with length LEN.
|
||||||
|
Return the number of bytes read (zero indicates failure). */
|
||||||
|
|
||||||
extern int gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch);
|
extern int gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch);
|
||||||
|
|
||||||
typedef LONGEST (gdbarch_core_xfer_shared_libraries_aix_ftype) (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
typedef ULONGEST (gdbarch_core_xfer_shared_libraries_aix_ftype) (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
||||||
extern LONGEST gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
extern ULONGEST gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len);
|
||||||
extern void set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix);
|
extern void set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix);
|
||||||
|
|
||||||
/* How the core target converts a PTID from a core file to a string. */
|
/* How the core target converts a PTID from a core file to a string. */
|
||||||
|
@ -672,12 +672,15 @@ F:char *:elfcore_write_linux_prpsinfo:bfd *obfd, char *note_data, int *note_size
|
|||||||
M:int:find_memory_regions:find_memory_region_ftype func, void *data:func, data
|
M:int:find_memory_regions:find_memory_region_ftype func, void *data:func, data
|
||||||
|
|
||||||
# Read offset OFFSET of TARGET_OBJECT_LIBRARIES formatted shared libraries list from
|
# Read offset OFFSET of TARGET_OBJECT_LIBRARIES formatted shared libraries list from
|
||||||
# core file into buffer READBUF with length LEN.
|
# core file into buffer READBUF with length LEN. Return the number of bytes read
|
||||||
M:LONGEST:core_xfer_shared_libraries:gdb_byte *readbuf, ULONGEST offset, ULONGEST len:readbuf, offset, len
|
# (zero indicates failure).
|
||||||
|
# failed, otherwise, return the red length of READBUF.
|
||||||
|
M:ULONGEST:core_xfer_shared_libraries:gdb_byte *readbuf, ULONGEST offset, ULONGEST len:readbuf, offset, len
|
||||||
|
|
||||||
# Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared
|
# Read offset OFFSET of TARGET_OBJECT_LIBRARIES_AIX formatted shared
|
||||||
# libraries list from core file into buffer READBUF with length LEN.
|
# libraries list from core file into buffer READBUF with length LEN.
|
||||||
M:LONGEST:core_xfer_shared_libraries_aix:gdb_byte *readbuf, ULONGEST offset, ULONGEST len:readbuf, offset, len
|
# Return the number of bytes read (zero indicates failure).
|
||||||
|
M:ULONGEST:core_xfer_shared_libraries_aix:gdb_byte *readbuf, ULONGEST offset, ULONGEST len:readbuf, offset, len
|
||||||
|
|
||||||
# How the core target converts a PTID from a core file to a string.
|
# How the core target converts a PTID from a core file to a string.
|
||||||
M:char *:core_pid_to_str:ptid_t ptid:ptid
|
M:char *:core_pid_to_str:ptid_t ptid:ptid
|
||||||
|
@ -168,14 +168,14 @@ out:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static LONGEST
|
static ULONGEST
|
||||||
windows_core_xfer_shared_libraries (struct gdbarch *gdbarch,
|
windows_core_xfer_shared_libraries (struct gdbarch *gdbarch,
|
||||||
gdb_byte *readbuf,
|
gdb_byte *readbuf,
|
||||||
ULONGEST offset, ULONGEST len)
|
ULONGEST offset, ULONGEST len)
|
||||||
{
|
{
|
||||||
struct obstack obstack;
|
struct obstack obstack;
|
||||||
const char *buf;
|
const char *buf;
|
||||||
LONGEST len_avail;
|
ULONGEST len_avail;
|
||||||
struct cpms_data data = { gdbarch, &obstack, 0 };
|
struct cpms_data data = { gdbarch, &obstack, 0 };
|
||||||
|
|
||||||
obstack_init (&obstack);
|
obstack_init (&obstack);
|
||||||
|
@ -965,14 +965,14 @@ rs6000_aix_shared_library_to_xml (struct ld_info *ldi,
|
|||||||
as the consumer of the XML library list might live in a different
|
as the consumer of the XML library list might live in a different
|
||||||
process. */
|
process. */
|
||||||
|
|
||||||
LONGEST
|
ULONGEST
|
||||||
rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch, const gdb_byte *ldi_buf,
|
rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch, const gdb_byte *ldi_buf,
|
||||||
gdb_byte *readbuf, ULONGEST offset, ULONGEST len,
|
gdb_byte *readbuf, ULONGEST offset, ULONGEST len,
|
||||||
int close_ldinfo_fd)
|
int close_ldinfo_fd)
|
||||||
{
|
{
|
||||||
struct obstack obstack;
|
struct obstack obstack;
|
||||||
const char *buf;
|
const char *buf;
|
||||||
LONGEST len_avail;
|
ULONGEST len_avail;
|
||||||
|
|
||||||
obstack_init (&obstack);
|
obstack_init (&obstack);
|
||||||
obstack_grow_str (&obstack, "<library-list-aix version=\"1.0\">\n");
|
obstack_grow_str (&obstack, "<library-list-aix version=\"1.0\">\n");
|
||||||
@ -1009,7 +1009,7 @@ rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch, const gdb_byte *ldi_buf,
|
|||||||
|
|
||||||
/* Implement the core_xfer_shared_libraries_aix gdbarch method. */
|
/* Implement the core_xfer_shared_libraries_aix gdbarch method. */
|
||||||
|
|
||||||
static LONGEST
|
static ULONGEST
|
||||||
rs6000_aix_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
|
rs6000_aix_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch,
|
||||||
gdb_byte *readbuf,
|
gdb_byte *readbuf,
|
||||||
ULONGEST offset,
|
ULONGEST offset,
|
||||||
|
@ -18,11 +18,11 @@
|
|||||||
#ifndef RS6000_AIX_TDEP_H
|
#ifndef RS6000_AIX_TDEP_H
|
||||||
#define RS6000_AIX_TDEP_H
|
#define RS6000_AIX_TDEP_H
|
||||||
|
|
||||||
extern LONGEST rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch,
|
extern ULONGEST rs6000_aix_ld_info_to_xml (struct gdbarch *gdbarch,
|
||||||
const gdb_byte *ldi_buf,
|
const gdb_byte *ldi_buf,
|
||||||
gdb_byte *readbuf,
|
gdb_byte *readbuf,
|
||||||
ULONGEST offset,
|
ULONGEST offset,
|
||||||
ULONGEST len,
|
ULONGEST len,
|
||||||
int close_ldinfo_fd);
|
int close_ldinfo_fd);
|
||||||
|
|
||||||
#endif /* RS6000_AIX_TDEP_H */
|
#endif /* RS6000_AIX_TDEP_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user