public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Install fileio.h to share File I/O protocol type definitions
       [not found] <20180709093410.63068-1-julio@farjump.io>
@ 2018-07-09  9:34 ` Julio Guerra
  2018-07-25 19:37   ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Julio Guerra @ 2018-07-09  9:34 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pedro Alves, Julio Guerra

Prevent remote programs from redefining File I/O protocol types by installing
include/gdb/fileio.h to share its type definitions.

Signed-off-by: Julio Guerra <julio@farjump.io>
---
 gdb/ChangeLog   | 4 ++++
 gdb/Makefile.in | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index eb65f91488..9cb2710f4c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-07-09  Julio Guerra  <julio@farjump.io>
+
+	* Makefile.in (install-only): Install include/gdb/fileio.h.
+
 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* contrib/gdb-add-index.sh ($dwarf5): New, use it.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 13627e07e0..6998a70c0c 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1747,7 +1747,8 @@ install-only: $(CONFIG_INSTALL)
 		$(INSTALL_PROGRAM) gdb$(EXEEXT) \
 			$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
 		$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(includedir)/gdb ; \
-		$(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h
+		$(INSTALL_DATA) jit-reader.h $(DESTDIR)$(includedir)/gdb/jit-reader.h ; \
+		$(INSTALL_DATA) $(INCLUDE_DIR)/gdb/fileio.h $(DESTDIR)$(includedir)/gdb/fileio.h
 	if test "x$(HAVE_NATIVE_GCORE_TARGET)$(HAVE_NATIVE_GCORE_HOST)" != x; \
 	then \
 	  transformed_name=`t='$(program_transform_name)'; \
-- 
2.18.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Install fileio.h to share File I/O protocol type definitions
  2018-07-09  9:34 ` [PATCH] Install fileio.h to share File I/O protocol type definitions Julio Guerra
@ 2018-07-25 19:37   ` Tom Tromey
       [not found]     ` <9f54db97-2e20-1935-c730-e6036a5809e0@farjump.io>
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2018-07-25 19:37 UTC (permalink / raw)
  To: Julio Guerra; +Cc: gdb-patches, Pedro Alves

>>>>> "Julio" == Julio Guerra <julio@farjump.io> writes:

Your message had ^M characters at the end of each line - no big deal but
please make sure this isn't what would appear an eventual push.

Julio> Prevent remote programs from redefining File I/O protocol types by installing
Julio> include/gdb/fileio.h to share its type definitions.

This seems reasonable enough, but what is it you plan to use it for?
(I could guess I suppose but it seemed better to ask.)

It seems like it would be a good idea to have some documentation for
this, if it's something we intend to support.

thanks,
Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Install fileio.h to share File I/O protocol type definitions
       [not found]     ` <9f54db97-2e20-1935-c730-e6036a5809e0@farjump.io>
@ 2018-07-25 20:01       ` Julio Guerra
  2018-09-07 22:08         ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Julio Guerra @ 2018-07-25 20:01 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, Pedro Alves

Le 25/07/2018 à 21:37, Tom Tromey a écrit :
>>>>>> "Julio" == Julio Guerra <julio@farjump.io> writes:
> Your message had ^M characters at the end of each line - no big deal but
> please make sure this isn't what would appear an eventual push.

I am not sure to understand where did you saw ^M chars? I used git
format-patch + send-email as usually, I don't understand where they
could come from.

> Julio> Prevent remote programs from redefining File I/O protocol types by installing
> Julio> include/gdb/fileio.h to share its type definitions.
>
> This seems reasonable enough, but what is it you plan to use it for?
> (I could guess I suppose but it seemed better to ask.)

When you implement gdb stubs supporting the File I/O protocol, the
remote programs then using File I/O services will require those types.
Right now, we have to define them ourselves, but by installing this
file, we could firstly stop redefining them, and secondly, have some
kind of single source of truth as it's easy to do mistakes when
redefining them (actually, our struct stat redefinition was wrong for
years, but no one was using it until now).

> It seems like it would be a good idea to have some documentation for
> this, if it's something we intend to support.

The documentation already talks about these types here
https://sourceware.org/gdb/onlinedocs/gdb/Protocol_002dspecific-Representation-of-Datatypes.html#Protocol_002dspecific-Representation-of-Datatypes
But do you want me to add some documentation about this file being
installed before the list?

-- 
Julio Guerra


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Install fileio.h to share File I/O protocol type definitions
  2018-07-25 20:01       ` Julio Guerra
@ 2018-09-07 22:08         ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2018-09-07 22:08 UTC (permalink / raw)
  To: Julio Guerra; +Cc: Tom Tromey, gdb-patches, Pedro Alves

>>>>> "Julio" == Julio Guerra <julio@farjump.io> writes:

Thanks for your patience on this repsonse.

The gdb rule is that you can ping a patch (or in this case, IMO, really
any question) after 2 weeks, and then weekly thereafter.  This may be
uncomfortable (I never really got into it) but it really is ok.

>> It seems like it would be a good idea to have some documentation for
>> this, if it's something we intend to support.

Julio> The documentation already talks about these types here
Julio> https://sourceware.org/gdb/onlinedocs/gdb/Protocol_002dspecific-Representation-of-Datatypes.html#Protocol_002dspecific-Representation-of-Datatypes
Julio> But do you want me to add some documentation about this file being
Julio> installed before the list?

I think that would be a good idea.

thanks,
Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-07 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180709093410.63068-1-julio@farjump.io>
2018-07-09  9:34 ` [PATCH] Install fileio.h to share File I/O protocol type definitions Julio Guerra
2018-07-25 19:37   ` Tom Tromey
     [not found]     ` <9f54db97-2e20-1935-c730-e6036a5809e0@farjump.io>
2018-07-25 20:01       ` Julio Guerra
2018-09-07 22:08         ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).