aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/common-inferior.cc
AgeCommit message (Collapse)AuthorFilesLines
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-05-25gdbsupport: Let construct_inferior_arguments take gdb::array_view paramMichael Weghorn1-9/+7
Adapt the construct_inferior_arguments function to take a gdb::array_view<char * const> parameter instead of a char * array and an int indicating the length and adapt the only call site. This will allow calling it more simply in a follow-up patch introducing more uses of the function. gdbsupport/ChangeLog: * common-inferior.cc, common-inferior.h (construct_inferior_arguments): Adapt to take a gdb::array_view<char * const> parameter. Adapt call site. Change-Id: I1c6496c8c0b0eb3ef3fda96e9e3bd64c5e6cac3c
2020-05-25gdbsupport: Adapt construct_inferior_argumentsMichael Weghorn1-43/+22
Allow construct_inferior_arguments to handle zero args and have it return a std::string, similar to how stringify_argv in gdbsupport/common-utils does. Also, add a const qualifier for the second parameter, since it is only read, not written to. The intention is to replace existing uses of stringify_argv by construct_inferior_arguments in a subsequent step, since construct_inferior_arguments properly handles special characters, while stringify_argv doesn't. gdbsupport/ChangeLog: * common-inferior.cc, common-inferior.h (construct_inferior_arguments): Adapt to handle zero args and return a std::string. Adapt call site. Change-Id: I126c4390a1018c7527b0b8fd545252ab8a5a7adc
2020-05-25gdb: Move construct_inferior_arguments to gdbsupportMichael Weghorn1-0/+122
This moves the function construct_inferior_arguments from gdb/inferior.h and gdb/infcmd.c to gdbsupport/common-inferior.{h,cc}. While at it, also move the function's comment to the header file to align with current standards. The intention is to use it from gdbserver in a follow-up commit. gdb/ChangeLog: * infcmd.c, inferior.h: (construct_inferior_arguments): Moved function from here to gdbsupport/common-inferior.{h,cc} gdbsupport/ChangeLog: * common-inferior.h, common-inferior.cc: (construct_inferior_arguments): Move function here from gdb/infcmd.c, gdb/inferior.h Change-Id: Ib9290464ce8c0872f605d8829f88352d064c30d6
2020-02-13gdbsupport: rename source files to .ccSimon Marchi1-0/+26
This patch renames the .c source files in gdbsupport to .cc. In the gdb directory, there is an argument against renaming the source files, which is that it makes using some git commands more difficult to do archeology. Some commands have some kind of "follow" option that makes git try to follow renames, but it doesn't work in all situations. Given that we have just moved the gdbsupport directory, that argument doesn't hold for source files in that directory. I therefore suggest renaming them to .cc, so that they are automatically recognized as C++ by various tools and editors. The original motivation behind this is that when building gdbsupport with clang, I get: CC agent.o clang: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Werror,-Wdeprecated] In the gdb/ directory, we make clang happy by passing "-x c++". We could do this in gdbsupport too, but I think that renaming the files is a better long-term solution. gdbserver still does its own build of gdbsupport, so a few changes in its Makefile are necessary. gdbsupport/ChangeLog: * Makefile.am: Rename source files from .c to .cc. (CC, CFLAGS): Don't override. (AM_CFLAGS): Rename to ... (AM_CXXFLAGS): ... this. * Makefile.in: Re-generate. * %.c: Rename to %.cc. gdbserver/ChangeLog: * Makefile.in: Rename gdbsupport source files from .c to .cc.