Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[HS?] Remote debugging

4 réponses
Avatar
Guillaume GOURDIN
Bonjour à tous,

voilà ma problématique : je compile une application en local, et je
voudrais la debugguer en la faisant tourner sur une machine distance.
Quelle est la procédure standard pour effectuer ce genre d'opérations?
J'imagine que c'est le cas, mais GDB permet-il de débugger à distance?

Merci pour votre aide.

4 réponses

Avatar
Aris
Bonjour à tous,

voilà ma problématique : je compile une application en local, et je
voudrais la debugguer en la faisant tourner sur une machine distance.
Quelle est la procédure standard pour effectuer ce genre d'opérations?
J'imagine que c'est le cas, mais GDB permet-il de débugger à distance?

Merci pour votre aide.
tu n'as pas cité ton OS. Sous unix, c'est trivial, il suffit que gdb

soit installé sur la machine distante, et attacher le programme pendant
qu'il tourne avec gdb en console.

Si tu as un ide ou un environnement particulier à respecter, il faut le
dire (par ex je pense qu'eclipse permet le debugging à distance via gdb
mais faut le configurer pour)

Avatar
Guillaume GOURDIN
could earn as much as thirty dollars a month at sewing in
California, and he could secure her passage for her at economical
cost. She returned to her home and consulted her parents, and they
thought the chance a good one, so bidding her little ones good bye,
she returned to Hong Kong and paid for the ticket, being instructed
that a certain woman would meet her at the wharf at San Francisco whom
she must claim as her "mother," since the immigration laws were so
strict that she must pass herself off as the daughter of this woman
(for this daughter, who was now in China, having lived in the United
States was entitled to return to her mother). Reader, have you ever
traveled on another's ticket? If so, or if you have known a professing
Christian to have done so, do not be too harsh in your judgment of
this heathen, and declare she deserved the terrible fate that overtook
her. The "mother" met the sewing-woman, brought her to Oakland, and
imprisoned her in a horrible den to earn money for her. With utmost
caution our missionary friend rescued her. The Captain of Police and
other officers were at hand to help the missionary, and when the girl
was taken, she struggled frantically and called for help as though
being kidnaped. Had the policemen been there alone they would have let
the captors have their slave, believing they had made a mistake. But
they had not; the missionary knew that; the girl was only thinking
ahead of the possibility of the plot failing and of falling back into
the hands of her captors. She must never betray to them, until safely
out of their clutches, that she _wished_ to come away. She must make
it appear that she was dragged away against her will. And this is free
America! Do you wonder that these girls do not tell everybody who asks
them that they are unwilling captives? Doubtless they would if our
officers of the law showed their good faith by laying hold of these
slave dealers. Nothin
Avatar
Guillaume GOURDIN
voilà ma problématique : je compile une application en local, et je
voudrais la debugguer en la faisant tourner sur une machine distance.
Quelle est la procédure standard pour effectuer ce genre d'opérations?
J'imagine que c'est le cas, mais GDB permet-il de débugger à distance?

Merci pour votre aide.
tu n'as pas cité ton OS. Sous unix, c'est trivial, il suffit que gdb

soit installé sur la machine distante, et attacher le programme pendant
qu'il tourne avec gdb en console.

Si tu as un ide ou un environnement particulier à respecter, il faut le
dire (par ex je pense qu'eclipse permet le debugging à distance via gdb
mais faut le configurer pour)


Je suis sous Linux, et effectivement, dans la mesure du possible,
j'aimerai débugguer avec Eclipse. Mais sinon, comment procède t-on avec gdb?


Avatar
Aris
voilà ma problématique : je compile une application en local, et je
voudrais la debugguer en la faisant tourner sur une machine distance.
Quelle est la procédure standard pour effectuer ce genre
d'opérations? J'imagine que c'est le cas, mais GDB permet-il de
débugger à distance?

Merci pour votre aide.
tu n'as pas cité ton OS. Sous unix, c'est trivial, il suffit que gdb

soit installé sur la machine distante, et attacher le programme
pendant qu'il tourne avec gdb en console.

Si tu as un ide ou un environnement particulier à respecter, il faut
le dire (par ex je pense qu'eclipse permet le debugging à distance via
gdb mais faut le configurer pour)


Je suis sous Linux, et effectivement, dans la mesure du possible,
j'aimerai débugguer avec Eclipse. Mais sinon, comment procède t-on avec
gdb?
bien dans la mesure du possible

ssh ip_du_client
s'assurer que le programme tourne avec ps aux
trouver le PID du processus
gdb /usr/bin/nomduprogramme
attach le_pid_du_processus
run
... attendre un crash ou mettre un breakpoint

commande la plus utile : bt (obtenir un relevé du stack pour savoir dans
quelle contexte s'est déroulé le crash
x nom_de_variable (informations sur le contenu de la variable)
etc.

pour interfacer ssh en remote avec eclipse, je n'ai pas la moindre idée
de comment faire