* [PATCH] x86-64 fixes
@ 2003-03-14 17:08 Elena Zannoni
2003-03-14 20:19 ` Andrew Cagney
2003-03-21 12:19 ` Michal Ludvig
0 siblings, 2 replies; 4+ messages in thread
From: Elena Zannoni @ 2003-03-14 17:08 UTC (permalink / raw)
To: gdb-patches; +Cc: mludvig
This patch fixes two internal errors I was getting with inferior
function calls. Gdb didn't know how to deal with enum parameters and
reference parameters.
It also fixes some calls to malloc() failures. These were evident in
tests that do stuff like p "foo" or p str_func ("foo") or even simple
calls like p malloc(2).
Michal, can you verify on your platform? If it works for you I'll
commit it.
thanks
elena
2003-03-14 Elena Zannoni <ezannoni@redhat.com>
* x86-64-tdep.c (x86_64_push_arguments): Handle correctly the
signed integer case.
(classify_argument): Handle enumerations and references.
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/uberbaum/gdb/x86-64-tdep.c,v
retrieving revision 1.56
diff -u -p -r1.56 x86-64-tdep.c
--- x86-64-tdep.c 14 Mar 2003 16:05:36 -0000 1.56
+++ x86-64-tdep.c 14 Mar 2003 17:07:08 -0000
@@ -471,6 +471,8 @@ classify_argument (struct type *type,
return 2;
}
break;
+ case TYPE_CODE_ENUM:
+ case TYPE_CODE_REF:
case TYPE_CODE_INT:
case TYPE_CODE_PTR:
switch (bytes)
@@ -700,11 +702,17 @@ x86_64_push_arguments (int nargs, struct
intreg += 2;
break;
case X86_64_INTEGERSI_CLASS:
- deprecated_write_register_gen (int_parameter_registers[intreg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
- offset += 8;
- intreg++;
- break;
+ {
+ LONGEST num
+ = extract_signed_integer (VALUE_CONTENTS_ALL (args[i])
+ + offset, 4);
+ regcache_raw_write_signed (current_regcache,
+ int_parameter_registers[intreg / 2], num);
+
+ offset += 8;
+ intreg++;
+ break;
+ }
case X86_64_SSEDF_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSE_CLASS:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86-64 fixes
2003-03-14 17:08 [PATCH] x86-64 fixes Elena Zannoni
@ 2003-03-14 20:19 ` Andrew Cagney
2003-03-21 12:19 ` Michal Ludvig
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-03-14 20:19 UTC (permalink / raw)
To: Elena Zannoni; +Cc: gdb-patches, mludvig
> It also fixes some calls to malloc() failures. These were evident in
> tests that do stuff like p "foo" or p str_func ("foo") or even simple
> calls like p malloc(2).
Outch! A working ``(gdb) p malloc(...)'' is pretty fundmental to a
functional GDB. Without it, many of the test results are pretty
meaningless.
This should definitly help stablize the target.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86-64 fixes
2003-03-14 17:08 [PATCH] x86-64 fixes Elena Zannoni
2003-03-14 20:19 ` Andrew Cagney
@ 2003-03-21 12:19 ` Michal Ludvig
2003-04-04 19:31 ` Elena Zannoni
1 sibling, 1 reply; 4+ messages in thread
From: Michal Ludvig @ 2003-03-21 12:19 UTC (permalink / raw)
To: Elena Zannoni; +Cc: gdb-patches
Elena Zannoni wrote:
> This patch fixes two internal errors I was getting with inferior
> function calls. Gdb didn't know how to deal with enum parameters and
> reference parameters.
>
> It also fixes some calls to malloc() failures. These were evident in
> tests that do stuff like p "foo" or p str_func ("foo") or even simple
> calls like p malloc(2).
>
> Michal, can you verify on your platform? If it works for you I'll
> commit it.
Yes, works nice, thanks! Please commit it.
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86-64 fixes
2003-03-21 12:19 ` Michal Ludvig
@ 2003-04-04 19:31 ` Elena Zannoni
0 siblings, 0 replies; 4+ messages in thread
From: Elena Zannoni @ 2003-04-04 19:31 UTC (permalink / raw)
To: Michal Ludvig; +Cc: Elena Zannoni, gdb-patches
Michal Ludvig writes:
> Elena Zannoni wrote:
> > This patch fixes two internal errors I was getting with inferior
> > function calls. Gdb didn't know how to deal with enum parameters and
> > reference parameters.
> >
> > It also fixes some calls to malloc() failures. These were evident in
> > tests that do stuff like p "foo" or p str_func ("foo") or even simple
> > calls like p malloc(2).
> >
> > Michal, can you verify on your platform? If it works for you I'll
> > commit it.
>
> Yes, works nice, thanks! Please commit it.
>
committed.
> Michal Ludvig
> --
> * SuSE CR, s.r.o * mludvig@suse.cz
> * (+420) 296.545.373 * http://www.suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-04-04 19:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-14 17:08 [PATCH] x86-64 fixes Elena Zannoni
2003-03-14 20:19 ` Andrew Cagney
2003-03-21 12:19 ` Michal Ludvig
2003-04-04 19:31 ` Elena Zannoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox