From: Jitendra Pawar <jitendra@linsyssoft.com>
To: gdb-patches@sources.redhat.com
Subject: h/w watchpoint pointer initialization patch.
Date: Tue, 17 Jan 2006 09:35:00 -0000 [thread overview]
Message-ID: <1137490473.3508.33.camel@chanakya.linsyssoft.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 831 bytes --]
Hi All,
While debugging cvs gdb, I put a h/w watch point, when this watch point
hits gdb calls target_insert_watchpoint macro. This macro defination is
present in target.h as bellow:
#define target_insert_watchpoint(addr, len, type) \
(*current_target.to_insert_watchpoint) (addr, len, type)
In case of remote debugging *current_target.to_insert_watchpoint points
to remote_target_insert_watchpoint function, but while native debugging
it should points to <host_arch>_insert_watchpoint (e.g.
i386_insert_watchpoint) instead it points to return_minus_one function.
This patch removes declaration of macros in file gdb/config/i386/nm-
i386.h for insertion and removal of h/w watchpoints. Instead it
initializes register access methods in gdb/i386-linux-nat.c file.
That fixes the above problem.
thanks
- Jitendra
[-- Attachment #2: hw_watchpt_pointer_initialization.patch --]
[-- Type: text/x-patch, Size: 1088 bytes --]
--- src.orig/gdb/i386-linux-nat.c 2005-09-10 23:41:02.000000000 +0530
+++ src/gdb/i386-linux-nat.c 2006-01-16 19:31:29.000000000 +0530
@@ -842,6 +842,8 @@
/* Add our register access methods. */
t->to_fetch_registers = i386_linux_fetch_inferior_registers;
t->to_store_registers = i386_linux_store_inferior_registers;
+ t->to_insert_watchpoint = i386_insert_watchpoint;
+ t->to_remove_watchpoint = i386_remove_watchpoint;
/* Register the target. */
add_target (t);
--- src.orig/gdb/config/i386/nm-i386.h 2004-10-08 23:00:48.000000000 +0530
+++ src/gdb/config/i386/nm-i386.h 2006-01-17 12:31:37.299432944 +0530
@@ -97,14 +97,6 @@
#define target_stopped_data_address(target, x) i386_stopped_data_address(x)
-/* Use these macros for watchpoint insertion/removal. */
-
-#define target_insert_watchpoint(addr, len, type) \
- i386_insert_watchpoint (addr, len, type)
-
-#define target_remove_watchpoint(addr, len, type) \
- i386_remove_watchpoint (addr, len, type)
-
#define target_insert_hw_breakpoint(addr, shadow) \
i386_insert_hw_breakpoint (addr, shadow)
next reply other threads:[~2006-01-17 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-17 9:35 Jitendra Pawar [this message]
2006-01-22 20:22 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1137490473.3508.33.camel@chanakya.linsyssoft.com \
--to=jitendra@linsyssoft.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox