This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] TUI do not display current execution point
You're both right, here is the new proposal:
--
Denis
2007-12-19 Denis Pilat <denis.pilat@st.com>
* tui/tui-data.h (MAX_LOCATOR_ELEMENT_LEN): Defined to a bigger
value or to PATH_MAX when possible.
Index: tui-data.h
===================================================================
--- tui-data.h (revision 615)
+++ tui-data.h (working copy)
@@ -195,8 +195,11 @@ struct tui_command_element
char *line;
};
-
-#define MAX_LOCATOR_ELEMENT_LEN 100
+#ifdef PATH_MAX
+# define MAX_LOCATOR_ELEMENT_LEN PATH_MAX
+#else
+# define MAX_LOCATOR_ELEMENT_LEN 1024
+#endif
/* Elements in the locator window content. */
struct tui_locator_element
Daniel Jacobowitz wrote:
On Wed, Dec 19, 2007 at 02:56:18PM +0100, Pierre Muller wrote:
Code in gdb directory (utils.c and top.c)
using PATH_MAX first check if that macro is defined.
Shouldn't you do the same in that patch?
Yes. Also, please correct the ChangeLog entry; you're changing
MAX_LOCATOR_ELEMENT_LEN so that goes in parentheses.
Changing it to a bigger hardcoded constant is OK in this case,
although the right fix would be to remove the hardcoded length
(that's in the GNU Coding Standards, I think).