aboutsummaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-03-24 16:13:38 +0000
committerIan Lance Taylor <ian@airs.com>1997-03-24 16:13:38 +0000
commit9537b1d0208c61098b85fa674c0ccab100a7e4d9 (patch)
tree1c17731f819d19e0f847a2bbff994ea2ac77e2f9 /gprof
parent265e7c8ba686c097a8f0bd68a6da67327d41221c (diff)
downloadgdb-9537b1d0208c61098b85fa674c0ccab100a7e4d9.zip
gdb-9537b1d0208c61098b85fa674c0ccab100a7e4d9.tar.gz
gdb-9537b1d0208c61098b85fa674c0ccab100a7e4d9.tar.bz2
* Makefile.in (.c.o): Define TARGET_$(MY_TARGET) when compiling.
* gmon.h: Use bytes counts rather than sizeof in struct raw_phdr and struct raw_arc.
Diffstat (limited to 'gprof')
-rw-r--r--gprof/ChangeLog6
-rw-r--r--gprof/Makefile.in2
-rw-r--r--gprof/gmon.h23
3 files changed, 23 insertions, 8 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index d20bfdc..3f83ea6 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -1,3 +1,9 @@
+Mon Mar 24 11:12:26 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (.c.o): Define TARGET_$(MY_TARGET) when compiling.
+ * gmon.h: Use bytes counts rather than sizeof in struct raw_phdr
+ and struct raw_arc.
+
Mon Mar 17 10:54:47 1997 David Mosberger-Tang <davidm@azstarnet.com>
* cg_arcs.c (arc_add): memset() newly alloced arc to ensure
diff --git a/gprof/Makefile.in b/gprof/Makefile.in
index db3f0f0..69d5ea7 100644
--- a/gprof/Makefile.in
+++ b/gprof/Makefile.in
@@ -56,7 +56,7 @@ LDFLAGS=
HLDFLAGS = @HLDFLAGS@
HLDENV = @HLDENV@
.c.o:
- $(CC) -c -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd @DEFS@ -DMACHINE_H=\"$(MY_TARGET).h\" $(TCFLAGS) $(HCFLAGS) $(CFLAGS) $<
+ $(CC) -c -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd @DEFS@ -DTARGET_$(MY_TARGET) -DMACHINE_H=\"$(MY_TARGET).h\" $(TCFLAGS) $(HCFLAGS) $(CFLAGS) $<
all: $(GEN_FILES) $(PROG)
diff --git a/gprof/gmon.h b/gprof/gmon.h
index cef8516..019cb6c 100644
--- a/gprof/gmon.h
+++ b/gprof/gmon.h
@@ -37,10 +37,13 @@
struct raw_phdr
{
- /* FIXME: This is wrong; bfd_vma need not correspond any
- particular size on the target. */
- char low_pc[sizeof (bfd_vma)]; /* base pc address of sample buffer */
- char high_pc[sizeof (bfd_vma)]; /* max pc address of sampled buffer */
+#ifdef TARGET_alpha
+ char low_pc[8]; /* base pc address of sample buffer */
+ char high_pc[8]; /* max pc address of sampled buffer */
+#else
+ char low_pc[4]; /* base pc address of sample buffer */
+ char high_pc[4]; /* max pc address of sampled buffer */
+#endif
char ncnt[4]; /* size of sample buffer (plus this header) */
#if defined (__alpha__) && defined (__osf__)
@@ -113,9 +116,15 @@ struct tostruct
*/
struct raw_arc
{
- char from_pc[sizeof (bfd_vma)];
- char self_pc[sizeof (bfd_vma)];
- char count[sizeof (long)];
+#ifdef TARGET_alpha
+ char from_pc[8];
+ char self_pc[8];
+ char count[8];
+#else
+ char from_pc[4];
+ char self_pc[4];
+ char count[4];
+#endif
};
/*